We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Automated Responses on Smart Assessment do not correctly populate an answer

Tamara Sylte
Tera Contributor

I'm trying to meet a requirement to automatically answer some questions in a GRC Smart Attestation for a Control. 

 

Use case 1:

 

I have a radio button question with 2 answers (Yes/No) (Question 1). Then I created another radio button question with the same options (Question 2). If Question 1 is answered Yes, then Question 2 should default to Yes. Or if Question 1 is answered No, then Question 2 should default to No. However, when attestations are generated and completed, Question 2 is always  set to No. [Note the same behavior is observed for Drop-down and Check-box questions.]

TamaraSylte_0-1745005147795.png

TamaraSylte_1-1745005187736.png

 

Use case 2:

 

A question must be answered based on a value from the Entity's underlying record. I am attempting this with a script, however nothing that I can think of to try will get the answer to populate. I can run the script independently and it fetches the value I need, but when I try to answer the radio button question using the values shown on the form, nothing happens. No error is thrown, and gs.log/gs.info don't print anything. I even tried just setting the value (not using the GlideRecord lookup etc.)

 

Has anyone succeeded in getting the Automated Responses feature to work? 

 

 

 

 

 

2 ACCEPTED SOLUTIONS

Pooja Kotagiri
ServiceNow Employee

Use case1: 
Under Additional Options, there is a setting called 'Set response as editable'. When this is enabled (set to true),Response automation settings are evaluated only when the assessment is triggered. If it is disabled (set to false), the Response automation conditions are re-evaluated every time a dependent question changes. This behavior was not documented previously, but we will update our documentation to include this.

View solution in original post

Pooja Kotagiri
ServiceNow Employee

Use case2:

To set a radio button using a script, assign the value using: result.value = <response option sys_id>

View solution in original post

11 REPLIES 11

NitheeshkuS
Tera Contributor

@Pooja Kotagiri though we pass option sys_id, it is not getting reflected. Are we missing something here?

NitheeshkuS_0-1758726721748.png

 

ColeM
Kilo Sage

@Pooja Kotagiri I am having a similar issue where a scripted string is not populating for my assessment question on mobile.  The default appears to be set on the question instance record, but it is not showing in the mobile app when I take the survey.  The  Do you know what the issue could be here? 

 

Script.pngAssessment Question Instance.pngMobile Screenshot.png

 

 

Abhay Rathour
ServiceNow Employee

If the response if being set at question instance table but not reflecting on mobile app, there might be some other issue here and it is not related to script. The script and automation flow ends by setting up response at the question instance table or response option instance table depending on question type. Can you please check the GET api response for the data if you have access for the api. Also please try refreshing the assessment once.

HI @Abhay Rathour, thanks for your response. 

I do not believe I have API access for smart assessments, I am testing in my PDI. 

I have tried closing & re-openeing the smart assessment but I'm having the same issue.  

 

@michael255 mentioned the followng "FSM mobile smart assessments does not support automated responses in the fields as of Yokohama." src - Feature Shorts - Smart Assessment for Field Service Questionnaire

 

Can you confirm if FSM mobile automated responses are not supported for the Zurich release?

If so, do you know of possible workarounds? Is this functionality on the road map? 

 

 

In order to use the smart assessment automated response feature in the FSM mobile application we needed to complete the following: 

 

1)Update the ScriptedScreenHelper script include to contain a function named "isSaveFeatureEnabled" which returns true to override the function defined in ScriptedScreenHelperSNC

 

ColeM_1-1772214619734.jpeg

 

 

2) Delete all records on the sys_sg_screen_cache table

 

3) Clear instance cache by typing cache.do in the application navigator