If you want to write out that list into records anyway, you could also use a $$globalVariable.
Try this to add new values to the list, or remove existing ones:
Set Variable [ $id ; Table::pk ]
Set Variable [ $$favourites ;
$$favourites = $id ; "" ;
IsEmpty ( $$favourites ) ; $id ;
PatternCount ( $$favourites ; $id & Char(13) ) ; Substitute ( $$favourites ; $id & Char(13) ; "" ) ;
PatternCount ( $$favourites ; Char(13) & $id ) ; Substitute ( $$favourites ; Char(13) & $id ; "" ) ;
List ( $$favourites ; $id )
If you absolutely want to use a field, use Set Field and replace all reference to $$favourites with the field name; the logic remains the same.
You don't need that checkbox on the right as a field; you could just have a checked and an unchecked graphic and hide each if (not) IsEmpty ( FilterValues ( Table::pk ; $$favourites ) ).
btw, there is no apostrophe in the plural form of English words** ... (comp. "Deppenapostroph' ... ) ... just sayin'.
Thanks for the script...just works fine.
Deppenapostroph.....sehr witzig , werde es mir merken. Will ja nicht auffallen