Recording data from clicking elements and using it to do a basic calculation

Hi there,

Hope you’re well.

I am trying a new project: launching a quiz in my webapp, and I would love to get some help to do this.

My quiz is based on questions like these:

These questions are not built with repeating groups, they are unique pages.

What I would to do is to track the user’s responses and save this data to give him the score at the end of the quiz (and to save this data too).

So what I tried was to create a data type for the Quiz results:

I edited the workflow to change a thing to the Results quiz type, and update 1 if good answer, 0 if bad answer.

For instance after first question, the result looks like this:

Then I would like to create a “Score” page for the user. But I can’t figure how to do this:

I tried to do a Sumproduct calculation but it won’t work:

How could I do this basic sum? Based on the previous pages results?

Then, how could I display a text conditioned by the results (for instance if score is less than 5 'Oh no, you didn’t do well…)

Thank you very much!


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?

Well, help is very welcomed!


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.