Wix Database Automatically Delete

Hi!

Just set up a database that I can upload documents of certain types to.
Is there any way I can get it to keep just one of each type of document?

ie.
A “News” document for January is already in the database.
I upload a new document with the same “News” label for February.
Can I get it to automatically delete the previous one as it uploads the February one.

Any help would be greatly appreciated!
Thanks :slight_smile:

I think wixData.update is more relevant for you. Instead of uploading new doc, update the doc field. Same goes if you are using a Dataset

3 Likes