I have 3 questions: employees dedicated (radio button -3 options ), monthly quota (radio button- 3 options), and commission (radio button – 3 options) and need to create a calculation that is essentially
employees dedicated*monthly quota*commission. Does anyone know how i would go about this? I understand that i can use custom scripting but i was wondering if there were any examples i could use?
%%employees_qid = 1; // Question ID for “Employees Dedicated”
%%quota_qid = 2; // Question ID for “Monthly Quota”
%%commission_qid = 3; // Question ID for “Commission”
%%payout_qid = 4; // Question ID for the Hidden Value or Question where you want to store the calculated value
%%payout = sgapiGetValue(%%employees_qid) * sgapiGetValue(%%quota_qid) * sgapiGetValue(%%commission_qid);
On the above, I’m assuming that either the radio button options are actual numbers, or you’ve assigned each option a numeric reporting value. Either way, make sure you omit any characters that aren’t numbers or a period (e.g. the value for commission should omit dollar sign and commas).
Here’s a quick screenshot of how your survey could look:
And here’s how the Custom Script Action would look:
Use the “Question & Page ID Lookup” dropdown to find the correct question IDs to drop into the custom script.
If you need specific instructions for how to add Custom Scripting to your survey, then I suggest checking out SurveyGizmo’s help articles, or reaching out to them directly for help.