How to pass selected values of a List Collector from client side to script include using GlideAjax?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2022 06:44 AM
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.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2022 06:53 AM
Hi
List collector values stores comma separated.
What's your actual requirement?
Thanks,
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2022 07:35 AM
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(',');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2022 07:37 AM
Hi,
what processing you wish to perform by sending the values to script include using GlideAjax?
can you share your business requirement
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader