setValue API used with list collector variable in portal and too much data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2022 04:16 AM
Hello,
I think I'm hitting the issue that is described here:
- I have a 'users' list collector variable where we want to limit the number of selected users should be restricted to 50. So I have an 'onChange' client script that:
- copies the new value of the list collector into an array
- counts the number of users added
- if > 50 then remove the last entry in the array
- set the value of the list collector to the new array value (now containing 50 user sys_ids) using g_form.setValue
This isn't working and it looks like setValue is limited to around 30 sys_ids.
I've tried setting the variable attribute to glide_list as suggested in the above support article but it is still clearing the field instead of redisplaying the 50 users.
Has anyone seen this issue or can suggest a workaround?
Many thanks in advance.
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2022 04:34 AM
Hi,
Gave you added glide_list attribute on Variable configuration?
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2022 04:36 AM
Hi,
I tried g_form.setValue() in onLoad Client Script and added 60 users by hardcoding sys_id's. It worked for me.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 03:10 AM
I'm also facing this issue. g_form.setValue() works perfectly fine in Native UI but doesn't work in Service Portal even after setting glide_list attribute to true in the catalog item variable.