I am currently updating the voting functionality in an app. I am moving the votes from being only summarised (including user-specific columns to prevent duplicates) to being their own table so that I can build better reporting on patterns over time. I am having trouble when trying to update an existing vote. First time posting here so please do let me know if there is any additional information I should provide.
Action for creation and updating
Update action detail
Within this action for some reason I am not seeing all relations available within the “Feedback” table.
Feedback table columns
In this table the User Voted is checked when the user first votes either positively or negatively on the item. The User Vote ID is also populated with the ID of the user and is user specific. The vote query then checks that user and that feedback item in the “Votes” table. The Vote query Relation looks up the row id within the votes column based on the vote query
Votes table columns
In this table there should be an entry for every user voting on a feedback item (e.g. max one row per user per feedback item). For the updating the vote action (e.g. the user wants to switch to positive, negative or remove their vote entirely). I can’t seem to get it to do this from my action at the top.
I’m not sure where I am going wrong here, perhaps I should be breaking it down into separate actions? Or not try and do it from the feedback page itself?