How to pass selected values of a List Collector from client side to script include using GlideAjax?

GUNDIGI POOJIT1
Tera Contributor

After selecting values in the List Collector, how can I pass those multiple values from client script to script include using GlideAjax. And how can we store them in another array in the script include.

3 REPLIES 3

Murthy Ch
Giga Sage

Hi @GUNDIGI POOJITHA 

List collector values stores comma separated.

What's your actual requirement?

 

Thanks,

Murthy

Thanks,
Murthy

Viraj Hudlikar
Giga Sage

In your client script below line will get the value of the list collector.

var list = g_form.getValue("your_field_name_here"); //you will get sys_id value in comma separated form

Pass above variable when you call script include particular function which is client callable by GlideAjax method. 
Now in script include get that parameter and by split method use it as per your requirement  

var list = this.getParameter('sysparm_list_values');

var array = list.split(',');

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

what processing you wish to perform by sending the values to script include using GlideAjax?

can you share your business requirement

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader