Create DB Query & IMG upload from drop-down

Good morning/evening to whomever reads this. I’m currently working on a social media site and have set everything up successfully until this point.

At this time, I have created an administrative captive portal for the admin to login and upload images to user accounts as the admin has old photos that she will be adding to each user’s DB entry manually per a query. The drop-down needs to call the _ID of the selected user within the DB and pass along the value of that _ID of user selected to the upload image button. Thus, when, uploading the image, it will insert to the row/column for the selected user.

Might anyone have any ideas on how to accomplish this? Thank you in advance for any insights regarding this request and thank you admins at Wix Code that have already helped with your thousands of posts to users requesting your assistance!

Have a great day!

Once you select the user, you should create a query to your collection, fetching the user’s record. Then, upon submit, add the image from the image upload to the record and update() it.

1 Like

Thank you! I’m going to give that a try now…

Hey Ohad, I had to step away from the site due to other work-related projects. Just stepped back in and tried several iterations of your suggested methodologies, but I’m afraid my interpretations of your directives are somewhat abstract since I have failed to successfully achieve my original request.

Might you provide some more direction? I created a wixDataquery to my DB and tied it to a dropdown, but I’ve hit a wall with update().