It seems that my solution with Results quiz data type is not best suited…
Indeed when the user clicks many times on Good answer or Bad answer, it keeps on registering new entries: so how can we compute this to get only one result?
Hi there, @gregoire… it’s pretty clear (or at least I think it is) that you want to have only one thing per user in the Results Quiz data type, and the reason you are getting many things is because you are creating a new results quiz thing (step 4 in your workflow) every time the user clicks on an answer. If I understand your post correctly, here are some changes I would suggest…
First, I would add a field to the User data type that links to the user’s thing in the Results Quiz data type. Call the field in the User data type whatever you want (for this example, I will call it Quiz Answers), and select Results Quiz for its field type.
Next, I would probably add a field called Total (number) to the Results Quiz data type, and I would use it to store the user’s total as they progress through the quiz.
Now, assuming users have to sign up for your app, I would create a new thing in the Results Quiz data type for a user as part of the sign up workflow. Then, after that new thing is created, I would add a step in the same workflow to make changes to the current user and set their Quiz Answers field equal to the new thing that was just created in the Results Quiz data type.
With the above set up in place, you can now use the Make changes to thing… workflow action to make changes to the Current User's Quiz Answers any time an answer is clicked. You can also use this workflow action to update the Total field to keep a running total as a user goes through the quiz.
Finally, you can display the Total field to the user at the end of the quiz , and it would be quite easy to display conditional text by evaluating the number in the Total field.
So, does any of that make sense? It’s just food for thought on how I might go about it, and I hope it’s helpful.