Make Button in one List update a Property in a different Collection

I am making a yes/no voting app. Its database has three collections: Users, Questions, Votes.

There is a Questions page, which has a list of questions. There are two (Yes and No) buttons, associated with each questions. Each of the buttons creates an entry into the Votes collection.

I want to add two more buttons, which can update the entries in the Votes collection, but when I create those buttons and Add Action, the only Update options I have are Current Question and Logged in User.

Is there a way to make the buttons in my Questions list update a property in my Votes collection?

My actual goal is to make the first pair of buttons invisible if a Vote by this User-Topic combination already exists in the Votes collection and leave the other pair for the user to be able to change their vote as they please without adding new entries into the Votes collection.

Thanks for any help.

Hey @Simba,

Try making the button into a list, and just limit the list size to a single item. Then make the list of whatever collection you are trying to update, and filter accordingly. That might get you where you need to be!

2 Likes

This did it, Ben. Thanks!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.