Help and Suggestion for create Form and Result

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

Projeto_Luiza.aia (1.2 MB)

Urm..... so what's the problem? All I see is an incomplete set of blocks.

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.

For example.

Your final result is... yes it was 6%, it wasn't 10%, maybe it was 50%, I don't know it was 34%

You are not happy with the result. like the image two

Where is the matrix of 50 weights for the 50 different buttons?

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 :cry:
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.

This is a fuzzy math question.

You have 10 questions, each can be answered with one of

  • yes
  • no
  • so so
  • I don't know
  • Not applicable

How would you score those with pencil and paper?

Is Not Applicable the same score as Yes or No?
How about I Don't Know ?

Each has a weight

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?

I assume this code is where you catch that survey, button by button:

Unfortunately my knowledge of non-English languages is very poor.

Do those numbers match the scores for those buttons?
I suspect not.

Were you to fix the numbers to match your preceding post, the code to sum the current response to the total score would be

set global pesoTotal to get global pesoTotal + (the numerical score for that button.)

You would have to fix that in each and every of your fifty buttons.
(How happy are you now with your rubber stamp?)

Also, you lack any code to take that global pesoTotal and drop it into that Label you have in your Results section.

That would most easily go after you catch the last question answer.

Here is a link to the procedures chapter in the free online book.

You need it.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.