Questions?

Ask a Question
Back to All

How to compare result values and display an extended description for the highest score category

Dear team,

I have implemented a quiz with 35 questions that each have a single choice answer from 1 to 5.

I calculated 7 results using the provided formula feature by summing up the score of the questions in each category (e.g. category 1 has questions 1 to 5, category 2 has questions 6 to 10 etc).

On the results page I have configured 7 results, one for each category. All good up to here.

I would like to conditionally display a more comprehensive description for the category result which has the highest score compared to the other category results. For the rest of lower score the categories I would like to have only a basic description in the results, but I need to show the result score.

I would highly appreciate your advice on how to achieve the behavior above? So far I was only able to place conditions based what range does each result fall into.

I have noticed you support external Javascript and also have a small code editor for both the result and the description fields.

If feasible, I am fine to write Javascript logic to calculate the max between the 7 results and display a different paragraph text for the max result ideally in the small description editor. Bult I would need to know how to access the 7 result variables in Javascript to use them.

Thank you,

Dan