Hi @vytautast thank you very much for the help.
With your help I got it, I got confused in parts because I had mistakenly created the collection hahahaha
Regarding the item being displayed multiple times, I thought about setting it to be hidden when the item is already in the “Favorites” database, I already did this with buttons with a link.
Example, when the button attached to the database does not have the external link, it is hidden.
// Show button if it has a link and does not show if link is missing
$w.onReady(() => {
$w("#dynamicDataset").onReady(() => {
// Gets the current item properties and stores them in a variable called item
const item = $w("#dynamicDataset").getCurrentItem();
// Checks if the current item has a value in the "video" field
if (!item.trailer) {
// Collapses the video player if there is no value for "video"
$w("#button13").collapse();
}
});
});
I will try the same code to hide the “add favorites” button to see if this prevents the same item from being repeated in the person list, I do not know if it will work because it is a “reference” item.
I’ll look for a code that displays the “Remove from Favorites” button when the “Add Favorites” button.
I’ll try to match the above code and code below to try to do this before, sort of expecting defeat, but in case I hit even better. haha ha