- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2023 01:46 PM - edited 02-02-2023 01:49 PM
Hello, I am working on a Catalog item that is unique in a few ways.
One of the asks is that when a requestor is filling in the Catalog item they are asked to select at least two users who are identified as the "Owners" as part of the larger request.
I am using a list collector for the field referencing the sys_user table.
The problem I am looking to solve is preventing and notifying the requestor that they need to select at least two users from the list prior to being able to submit the catalog request form.
I saw some client-side scripting suggestions on how to limit and remove too many selections, however, I am looking for the opposite and I am unsure of how to write a script to check how many users are selected and to prevent the form from being submitted unless at least two users are selected.
This is what I have so far
Thank you
Any suggestions
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2023 11:40 PM
Follow below pics !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2023 10:08 PM
@Joshua Camacho you need to do 2 things
1. in variable update more information as note Minimum 2 users need to select.
2. You should be writing onSubmit script not on change.
onSubmit you can check how many users selected in that field using same script if length is less than 2 return false with message as 2 owners should be selected or what you want.
Thanks,
Bharath
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2023 11:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2023 09:58 AM
I appreciate the reply. I see that is for desktop. I am looking to have this client script applied to the service portal interface. Will this work for that too? Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2023 03:21 AM
@Joshua Camacho In client script select UI Type as all. So it will work in both Desktop and Portal.
Bharath Chintala