- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
This applies to one of our surveys which has 4 questions. 3/4 are valid scale questions while the 4th one is "Additional Comments". We don't want additional comments to be include on the final score calculation.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @bill_dev ,
ServiceNow stores survey responses in the asmt_assessment_instance_question table.
Each question has a question type (e.g., scale, text, choice).
"Additional Comments" is likely a text-type question, which doesn't have a numeric score.
Filter Only Scored Questions
When calculating the average score, use a GlideRecord or script to:
Exclude questions where question.type is not a scale (e.g., Likert, numeric).
Include only questions with numeric responses.
Use Business Rules or Script Includes
You can automate this logic using a Script Include or Business Rule to calculate and store the average score. Trigger it on survey submission or when needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @bill_dev ,
ServiceNow stores survey responses in the asmt_assessment_instance_question table.
Each question has a question type (e.g., scale, text, choice).
"Additional Comments" is likely a text-type question, which doesn't have a numeric score.
Filter Only Scored Questions
When calculating the average score, use a GlideRecord or script to:
Exclude questions where question.type is not a scale (e.g., Likert, numeric).
Include only questions with numeric responses.
Use Business Rules or Script Includes
You can automate this logic using a Script Include or Business Rule to calculate and store the average score. Trigger it on survey submission or when needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
I found out that the average score is a custom field and the calculation is a custom business rule. I'll go ahead and use "Weight" on the code. If weight is 0, exclude it from the calculation.
