How to write a sample script in Indicators?

Venkatesh35
Giga Contributor

How to get details of Risk\Control tasks in Indicators. Example with Risk, it has details like State, Owner, Description, Additional Information etc. How to get those values in Indicators with tab "Method" set to "Script".

find_real_file.png

In the figure given, Demo 13 is a Risk type file. 

find_real_file.png

Script retrieving the Demo 13 details(State, Description) into Indicators "Test 6" is needed. 

 

Thank You, 

Venkatesh.

9 REPLIES 9

Naveen Kumar4
ServiceNow Employee
ServiceNow Employee

Risk/Control data can be accessed by current variable.

Example script you can try

 

gs.info('name '+current.name);
gs.info('description '+current.description);
gs.info('state '+current.state); 

Hi Venkat,

Were you able to resolve the issue?

 

Thanks,

Naveen

No Naveen, I couldn't see the values of Name, State in Indicator record. Actually my query is, whenever an Indicator Result is generated for an Indicator there's a field called "Value". Name, State & Description values of desired Risk file should be available in "Value" field of Indicator Result record of that particular Indicator record. 

 

find_real_file.png

 

find_real_file.png

How to complete the task using "Script" in "Method" tab.

 

Thanks,

Venkatesh.

Hi,

Current object here is the control or the risk. So you should be able to get the details of that current object.


Thanks,
Ashutosh