Hello everyone, I would like a big help or suggestion from you on how to do what is written below.
Note: The screen in the project below is named "Tela_formulário_1"
In my project I would like to make a quiz.
I have 10 form screens, each form has a button named "yes", "no", "in part", "don't know", "does not apply" and a "next" button. Each button would have a weight. When the user clicked on a button it would move to another screen to choose another option and so on. When the user clicked on the last screen, the result button, it would open a screen with the average of all responses.
I believe the two screens would use the same logic. But my difficulty is at the time of the result.
I don't want it to be pretty, I want it to be functional. Just make it work and bring me the final result based on the user's choice
so... I would like some help on how to continue, I don't know how to do the logic of the blocks to bring the result at the end. That's why I created the article so that a friend can help me with what to research or how to make the blocks to give the result at the end.
So the idea was for each button to open another screen of the form.
So I'm here to ask for ideas on how to do this
I did some research on variables and I didn't find something that might suit me, maybe I didn't search properly.
That was what came to mind when trying to do these functions. So far it's working (the screen change). But I don't know how to calculate the weights to bring the final result.
I don't know how I could put the weight and the buttons in a single variable to reduce the blocks.
yes > weight "5"
no > weight "4"
more or less > weight "3"
I don't know > weight "2"
Not applicable > weight "1"
My idea would be, at the end, I would calculate the sum of all the choices on each screen and bring me the average.
For example:
The user only chose "Not applicable" which is worth "1". The sum at the end was 10, so I would divide 10 / 5 (button total) = 2. So the number 2 is "Low" would be the result final.
Another example
The user just chose "Yes" which is worth "5". The sum at the end was 50, so I would divide 50 / 5 (button total) = 10. So the number 10 is "High" would be the result final.
I just don't know how to do that in blocks, you know?