I have created the following scenario that is working roughly but giving me a big problem:
- Created a new Collection
- DblClick the information in the original table, it is added to the new collection
- The collection is read/write with members as authors, members can only read content that they author.
- This populates a table in the profile
export function resultsTable_dblClick ( event ) {
let toInsert = $w ( “#dynamicDataset” ). getCurrentItem (); //gets the current item
wixData . insert ( “MemberWishList” , toInsert ) //inserts the item
. then ( ( results ) => {
console . log ( “done adding item” )
} )
. catch ( ( err ) => {
let errorMsg = err ;
} );
}
The dblClick event works to add the item, but if a member adds the item to the MemberWishList they are the only ones who can read it. If another member wanted to add that same item to the database, it doesn’t generate a second entry that they own or let them see the other entry etc. So essentially, if one person has the item in their wishlist, no one else can.
I have the database table generated on a dynamic page and a non-dynamic. That doesn’t seem to affect anything.
I have looked at all the wish list tutorials, including Code Queen and there has not been a good solution for this particular thing. I even found a post from 2019 about this exact issue with no resolution so I am hoping someone can take a look and see what’s going wrong.