- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2022 08:03 AM
I am stuck on one requirement. There is one Multi-row variable set in catalog item where requester can add up to 100 users but should not be able to add the same User twice".
How I can restrict this? Please suggest.
Thanks in advance!
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2022 08:08 AM
Hello ,
For avoiding duplicate entries you can create an on submit client script inside MVRS
PLease use the below script this will work for sure
function onSubmit() {
var value = parent.g_form.getValue("<mrvs name>"); // change mrvs name
var arr = JSON.parse(value);
if (searchExisting(g_form.getValue("<column name to check>"), arr)) { // change column name
alert('There are duplicates please remove those before submitting');
return false;
}
}
function searchExisting(keyColumn, newArray) {
for (var i = 0; i < newArray.length; i++) {
if (newArray[i].<column name to check> == keyColumn) { // change column name
return true;
}
}
return false;
}
Please accept the solution if it helped you and close the thread. This might help others too with same query
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2024 04:53 AM
Hi Mohit,
Though type is selected as ALL, the code isn't working in Service Portal & we have the error "There is a JavaScript error in your browser console". Can you please suggest on this ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2025 09:59 AM
What is the resolution for this ? Can you guys let me know. I am facing the same issue

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2022 08:12 AM
Duplicate post, please delete one of these: https://community.servicenow.com/community?id=community_question&sys_id=b7f30d19dbe09590457ae6be1396...
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2022 09:27 AM
Done, thanks for letting me know.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2025 10:09 PM
@Allen Andreas Your provided link is not available , could you please send that here again which might be helpful for us.