user favourite items
Hi guys,
I have a list on the 'homepage' that is viewable by all users. I've added a button to the list that when clicked saves the listitem values to storage variables, then invokes a create service that uses those storage variables to adds the item to a new collection called 'favourite items'. These items are then mapped to a 'favourites' list on the users 'Profile' page. The 'favourites' list on the 'Profile' page uses access token so the favourites are unique to each user. Theres also a 'delete' button on the 'favourite' list that invokes a delete service that removes items from the 'favourites' list.
This is all working but I'm looking to make it a bit more user friendly.
Im wanting to have a button/toggle/checkbox on the homepage list which indicates whether the item is on the users favourite list or not. For example, having a toggle that would add the item to the 'favourite' list if toggled 'On'. if toggled 'Off' it will delete the item from favourites. This way when users return to the homepage list they can see if an item is in their 'favourites' or not.
At the moment it just shows an 'Add' button that just adds the item to the 'favourite' collection. It doesnt indicate if the items been added or not.
Is it possible this way?
Or is there a better solution/method?
Thanks