Calcualte survey response

nismon
Tera Expert

Hello Community, 

 

I have created a new table weekly_review, wherein there is a UI action to open a new survey, and the result is stored in the table asmt_assessment_instance. On my new table, I need to populate the calculated score of each individual survey from the asmt_assessment_instance table. The score field name is final_score. Is there a way to do this?

 

Please advise. 

2 REPLIES 2

Uncle Rob
Kilo Patron

When does the calculation happen?   Answer this and it will tell you if you need a business rule or a scheduled job.

What does "The score of each individual survey" mean?   Sum of all results?  Count of all results?  Average of all results?  Whatever the answer is, the business rule or scheduled job that you create from the first question will need to do that labor for you.  So you'd need to select the records (gliderecord), then do basic javascript math evaluations to get the aggregation that you want.  Then push that to the final_score field of the appropriate weekly review record.

 

I have a form with nine questions, and the options to choose are Yes, no, and NA, wherein the value of Yes is 1 and No is 0. This survey is mapped to a new table that I created. I need to add all nine responses divided by nine multiplied by 100, which will give the percentage.

 

Nischal1_1-1688200254569.png