Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Retrive value in list Collector

Rosy14
Kilo Sage

How Can I get all the seclected values in a List Collector in a script include?

Rosy14_0-1701854887603.png

 

5 REPLIES 5

RAMANA MURTHY G
Mega Sage

Hello @Rosy14 ,

You can write a onchange client script to get the values of list collector into an array 

here is the sample code

 

var traineesNames = g_form.getValue('select_trainee');     // select_trainee is the back end name of the list collector
var trainees = traineesNames.split(',');     // trainees variable contains all the selected names in the list collector

 

Please mark my answer correct & helpful, if it helps you

Thank you

 

 

Please mark my answer helpful  & correct if it helps you
Thank you

G Ramana Murthy
ServiceNow Developer