I have couple of questions for you. How I do sum or count on [question(“option value”), id=”4″, option=”10003″] and [question(“option value”), id=”4″, option=”10004″] on Radio Button grid responses?
Any java script custom script tutorial do you have for calculation of responses and show the calculated responses result to user at the end of survey or quiz?
I am making one quiz in SG and at the end I need to show the results and results are calculated with different formulas. I see the Calculate BMI example but that example use Custom group and text box. My questions are in Radio button grid format and I would like to show the compiled results at the end of my quiz to user. Really appreciated for your help.
That’s a good question on performing mathematical functions on data from your survey. Custom Scripting is the best way to perform these actions and then save the output. Here is our documentation on this language so you can investigate:
You will need a Professional or Enterprise account to use it. Here are the two key functions you will need to gather the responses and then save the output once you have performed your math:
I suggest using Hidden Value actions or Textbox questions to save your data.
Really appreciated, I achieved my goal with JS action. I didn’t try sgapiGetValue and sgapiSetValue. I utilized $ SG Function for general and then make all calculations in JS.
Thank you so much for your input.