Info MessageAt least one of flow, workflow or execution plan should be filled. Otherwise, when order is placed, then even on approving request, the stages of requested item won't be updated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2022 11:25 PM
Hello Team,
Can anyone elaborate on this?
I have not filled up both workflow and execution plan as I am using BR to generate SCTasks based on a MRVS rows. Is it mandatory to fill in these?
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2022 11:49 PM
Hi,
you can use onSubmit client script and check at least 1 is selected or not
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2022 11:51 PM
Hi,
something like this as onSubmit on catalog item table
function onSubmit() {
var value1 = g_form.getValue('flow_designer_flow');
var value2 = g_form.getValue('workflow');
var value3 = g_form.getValue('delivery_plan');
if(!value1 && !value2 && !value3) {
g_form.addErrorMessage("Please select at least 1 field");
return false;
}
return true;
}
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 12:12 AM
Hello Ankur,
my question is that how can I overcome this inbuilt issue by not selecting either flow, workflow, execution plan?
Since I should not select either of these to generate SCTasks based on variable selection. If selected, execution plan by default two sctasks per ritm generated?
How could I proceed further?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022 12:18 AM
I am using After BR on insert, on RITM table
(function executeRule(current, previous /*null when async*/ ) {
var mrvs = current.variables.<mrvs_variableset>; //accessing MRVS
var rowCount = mrvs.getRowCount(); //gets row count
for (var i = 0; i < rowCount; i++) {
var sctask = new GlideRecord('sc_task');
sctask.initialize();
sctask.request_item = current.getUniqueValue();
sctask.setValue('sctask', current.getUniqueValue());
sctask.setValue('short_description', mrvs.getRow(i).<variable1>); //mapping short description
var intface = mrvs.getRow(i).getCell('<var2>').getCellDisplayValue();
if (intface === 'Other') {
sctask.setValue('description', 'var2:' +mrvs.getRow(i).var3); //interface values are mapped
} else {
sctask.setValue('description', 'var2:' +mrvs.getRow(i).var2);
}
sctask.insert(); //creates SCTasks
}
})(current, previous);