So i’m trying to build an app with a quistionary.
I have one collection containing a list of questions.
And another collection where I save the users answers.
So when the user logs in, I render the collection with questions, when a user clicks the question, I first create a new answer, and then link to a screen where the user can update the answer.
It works great.
But when they user goes back to the question page and realizes they answered wrong and want to correct their answer, I don’t wan’t to create a new answer. I want to update the existing answer.
Hi,
I have a similar problem.
I have 3 collections: users, books, reading log.
I tried to update the reading log with a button, but I can’t.
I found an alternative solution: I converted the button to a list.
So now I have two option:
So my app is a questionary where the user can register it’s car, and then respond to a lot of questions about the status of the car and upload images.
On the first page the user can create a new Health check, or select a previously created Health check from a list.
When the user clicks create a new Health check. I create a new Health check record in the HealthCheck collection and links it to the user, then passes it on to a new Page that displays a list of questions that is fetched from another collection called question.
When the user clicks on a question I create a new record in HealthCheckAnswer and send the user to that page so the user can answer the questions. The HealthCheckAnswer is linked to the question
and HealthCheck.
So far everything is fine.
But if the user goes back and want’s to change it’s answer for a question it’s not possible right now, instead a new HealthCheckAnswer is created. I wan’t instead to be able to find the linked HealthCheckAnswer and then update it.
In order to solve for the above you would need the back button to contain that info and link to the screen itself to fill in the answer. Using the standard “link back” functionality will not work in this instance.
Thanks for the suggestion, I might try that.
I got a bit creative and solved it by skipping the Questions and instead changed so when a new Healtcheck is created I also directly create the answers. Then I can always do updates instead.
The negative consequence is that I will have to make like 30 create requests, but it works.