Scripts possibility in Smart Assessment Engine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2025 01:30 PM - edited 08-11-2025 01:30 PM
Hi Community,
We are having a requirement that, need to create an assessments on controls table(sn_compliance_control) using smart assessment engine. I have created the templates and questions in the assessment workspace.
My query was: How we can add the script logics. for example, we can auto-populate the data on catalog form/record producer using onload client script with script include functionality.
I want to build same type of questionnaire template. when assessor(control owner) selects the control number in the reference question, need to auto-populate all the controls data, risks, owner information and other test plans on the template form.
How we can build this scripts scenario in smart assessment engine please let me know.
I am new to this smart assessment engine functionality, need your help and guidance to progress on my requirements(I know script include with form client script, but same logic how can i apply here with SAE).
Please guide me any one.
Thankyou.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hello @guthikondav , @Lokesh5 ,
You can make use of the scripting part within the automate response using below steps.
1. Set Editable to false
2. Use the questionInstanceId variable within the script, get the assessment instance.
3. Perform your scripting in the inline script or you can also leverage script include or flows
4. Finally set the required result to result.value variable.
ServiceNow Releavant Reference
Thanks,
Vinod Kumar M
ServiceNow Architect
Mark it helpful and Solution Accepted, if the response helped you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hello @Vinod54
Thanks for your response.
I wanted to check if there is a way to configure question behavior such that the available choices in the second question are dynamically limited based on the response selected in the first question.
For example, if a user selects a particular response in Question 1, the visibility of choices in Question 2 should automatically adjust and only display the relevant options. Ideally, this should happen through an 'Onchange' functionality.
Could you please confirm if this functionality is supported, or if there is an alternative approach to achieve this?