- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 07:48 PM
i have a requirement to do checking, to ensure multirow variable set is filled in by fulfiller and its not empty before closing the task.
i created a BR and it works fine. however, once the mrvs is filled, the task still cant be closed cause in ritm side, its considered empty.
how to fix this, thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 10:04 PM
this worked for me
function onSubmit() {
//Type appropriate comment here, and begin script below
if(g_form.getValue('state') == '3'){
var json = g_form.getValue('variables.servers'); // servers is my mrvs variable set name
var parsedData = JSON.parse(json);
if(parsedData.length == 0){
alert('The multi-row variable set must not be empty before closing the task.');
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 09:19 PM
updated the line, and its still showing the same error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 09:40 PM
During catalog task closure is user filling the MRVS? and then closing the task?
how are you testing this?
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 09:42 PM
correct.
1. user fill the MRVS
2. close task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 10:04 PM
this worked for me
function onSubmit() {
//Type appropriate comment here, and begin script below
if(g_form.getValue('state') == '3'){
var json = g_form.getValue('variables.servers'); // servers is my mrvs variable set name
var parsedData = JSON.parse(json);
if(parsedData.length == 0){
alert('The multi-row variable set must not be empty before closing the task.');
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2025 11:33 PM
Hope you are doing good.
Did my reply answer your question?
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