Users edit his own entry on a database

Hi! First of all, sorry for my bad english, I’m not a native speaker.
What I have?

  • Wix members area

  • Dynamic pages for members ID

  • Database for users data

  • One page on the members pages section to submit the data

  • One page on the member pages section to show the data that they already submit

What I want?

  • I want the users can edit later the data they submit

What’s the problem?

  • When users submit data successfully, they create a new entry on the daabase, when they try to edit the data, they end creating a new entry on the database

I hope you can help me, I already search everywehre and try everything, even I see people on youtube searching for the same answer.

Some captures:


I have this code, this way the users can access to a dynamic pages exclusives for him.


The page on members area to show the users data they already submit.


A lightbox for the users to submit his information.

Hello.

You can try the following:
Get the item being edited using getCurrentItem() ;
Use update() method to submit changes to the database collection.

The ID field is very important in this case and can be accessed as shown below:

let itemID = $w("#myDataset").getCurrentItem()._id;

Click here to learn more about working with the data API.

Good luck!

Hi! Thanks for your answer. I already solve this without code, On the “Update information” lightbox, set the dataset as read and write, and filter the data to show only owner.