- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 02:37 AM
Hi all,
in my catalog item I'm using List Collector with Variable attributes set as glide_list=true. This causes List Collector to display not as two lists, but as single list with search box.
I prefer this display, because records are not loaded during page load, but on demand in popup.
I would like to limit the number of selected records in the list and have my scripts prepared.
However, if I create onchange Catalog Client Script on this variable, the onchange is not fired when adding new records.
May it be, that onchange script on List Collector is not supported for this alternative display of List Collector?
Any ideas how can I limit the number of records in this type of List collector?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 05:27 AM
Hi Harsh,
which version of ServiceNow is running your instance? I have Helsinki and it does not work.
When I tried it on my personal instance which is Jakarta, then it works!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 02:52 AM
Hi peter,
Can you share the script you have written.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 03:00 AM
Hi Shena,
actually the content of the script is not important.
If I have as a script a simple alert, it's never fired.
function onChange(control, oldValue, newValue, isLoading) {
alert('event triggered');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 03:05 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 03:45 AM
Hi Peter,
i tried with simple alert() and i am able to get alert message.
function onChange(control, oldValue, newValue, isLoading) {
if (!isLoading || newValue != '') {
alert('hello world');
return;
}
//Type appropriate comment here, and begin script below
}
hope it will help you