List collector
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 10:38 AM
I have the following list collector. My requirement is if 'None' is selected, then the other options can not be selected, how can i achieve that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 11:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 12:26 PM
thank you, but that didn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 10:24 PM
I tried it in my PDI and it was working.
Basically, you have to create a onChange client script for that variable and replace the variable value in script from "software_choices" to your variable name.
Also , relace the sysID of None from your instance. You can find the sysID of None by "inspect" option .
let me know if you have any other issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 10:32 PM
list collector is referring to which table?
Is "None" a value in that table being referred
why not validate this using onSubmit catalog client script?
Simply check if the value contains None and any 1 other value then throw an error and stop user from submission?
function onSubmit() {
var selectedValuesArray = g_form.getValue('variableName').split(',');
var noneSysId = 'sysId'; // sys_id of None record
if (selectedValuesArray.indexOf(noneSysId) > -1 && selectedValuesArray.length > 1) {
g_form.addErrorMessage('You cannot select other options along with none.');
return false;
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader