List Collector Restriction
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 12:09 AM
Hi,
Can someone please help me on the below script.
Based on the what type of restoration do you need i need to restrict the select the server names variable(The type of the variable is List collector).
EX: If the option is Full VM i can only select 5 servers in the selection
If the option is Files(s) i can select only 1 server in the selection
If the option is NDMP i can select only 2 server in the selection
Please help me on the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 12:21 AM - edited 01-28-2024 12:23 AM
Hello @nikhitha24
You can use advanced reference qualifier on select server names varible
Assuming you have 'restoration' fields (or mag be with different name) available on table which is referenced by 'select server names' variable.
write below code in reference qualifier option on variable:
javascript: 'restoration=' + current.variables.<backend name of what type of restoration do you need>;
Please see the below pic as colon (:) symbol after javascript above will get converted to '&colon' due to editor here
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 02:48 AM
Hi @nikhitha24 ,
If there is relationship present between the option on catalog item n servers then u can proceed ahead with what Vishal has suggested.
If not then I think the best option for this requirement would be to use a select box n populate that field using g_form.addOption();
As the number of servers u mentioned in ur question are very few, select box field type will be a better suit I feel.
Thanks,
Danish