Multiple requested item using MRVS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 12:38 AM
Hi,
I have a catalog item with one multi row variable set.I want to create multiple requested item based on number of rows in the MRVS.Suppose there are 3 rows in the MRVS, then i need 3 requested item tagged under one request.
How can i achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 01:38 AM
whenever you submit catalog item it will create RITM and REQ. that is out of the box
why to remove that?
the for each will run 3 times so it will create 3 RITMS
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 01:46 AM
For each loop is running 3 times only and creating 3 requested item.But this flow is triggering after the default requested item creation.Because of that i am getting 4 requested item tagged to the request.And the requested item which is creating from For each loop doesnot have any variables defined.Only the default requested item has variables.
Request you to replicate this in your instance.
My requirement is whenever i submit the catalog item..i need one request and multiple requested item based on MRVS .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 02:10 AM
whenever you submit catalog item 1 RITM and 1 REQ will get created that is OOB behavior.
now on submission of your catalog item you are triggering flow and that is creating next RITMs
you are using Create Record action but don't use that
I already said in my 1st response to use Submit Catalog Request Action which is available OOB in flow.
When you use that you will get 3 RITMs and 3 REQs since for each will run 3 times
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
09-14-2023 12:54 AM - edited 09-14-2023 12:55 AM
Hi Sarika,
Please use the below code in the "Run Script" activity in the workflow. Modify the catalog item sys_id and variables data as per your requirement.
var mrvs = JSON.parse(current.variables.mrvs); //mrvs is the name of the multi row variable set
var mrvsLen = mrvs.length;
for(var i=0;i<mrvsLen;i++) {
var request = new sn_sc.CartJS();
var item = {
'sysparm_id': '0d08837237153000158bbfc8bcbe5d02', //sys_id of the catalog item
'sysparm_quantity': '1',
'variables':{ //add the catalog item variables below
'carrier': 'at_and_t_mobility',
'data_plan': '500MB',
'duration': 'eighteen_months',
'color': 'slate',
'storage': 'sixtyfour'
}
};
var orderDetails = request.orderNow(item);
gs.info(JSON.stringify(orderDetails));
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 12:58 AM
Hi Chaitanya,
I am using flow designer for my catalog item..How can i achieve this using flow designer.?