Unable to access Multi Row Variable Set values in Flow Designer – Grayed out in Create Catalog Task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi Team,
I have a Catalog Item where I am creating a Catalog Task (sc_task) using Flow Designer.
For normal catalog variables, I am able to populate the values in the Description field of the Catalog Task using:
Trigger → Requested Item → Variables
However, I have a Multi Row Variable Set (MRVS) on the catalog item.
When I try to access those variables inside the Create Catalog Task → Description field, the MRVS variables are grayed out and not selectable in the data pill picker.
Requirement:
After the catalog item is submitted, I need to display a variable value from MRVS in the Description of Catalog task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Alternative way ->
create a BR (insert/before)
trigger condition : item = <your catalog item name>
Sample code:
Var desc ='';
var descMRVS = current.variables.<your mrvs name>;
var descMRVS_rowcount = descMRVS.getRowCount();
for (var i=0; i<descMRVS_rowcount; i++)
{
var row = descMRVS.getRow(i);
desc += 'Start date ' + row.var1_mrvs + '\nuserName: ' + row.var2_mrvs + '\n';
}
task.description = desc;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hello @riyaz150819
1. **Get Catalog Variables:** Use this action first to pull the MRVS data from the Requested Item. 2. **For Each Loop:** Add a "For Each" logic block to iterate through the MRVS array. 3. **String Construction:** Inside the loop, use a Flow Variable or a Script step to append each row's data into a single string. * *Note:* For Reference fields (like Users), we must use a "Look Up Record" step inside the loop to get the **Display Value** (Name) instead of the Sys ID. 4. **Update Task:** Once the loop finishes, use the final compiled string to populate the Catalog Task's Description field. I have attached a detailed step-by-step guide and a sample script that we can use to implement this.
https://www.servicenow.com/community/itsm-forum/how-to-safely-calculate-percentages-in-a-finance-flo...
If this response proves useful, please mark it as Accept as Solution and Helpful.👍🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
46m ago
Hello @riyaz150819
Step-by-Step Configuration
1.Add the Action:
Click Add an Action, Flow Logic, or Subflow.
Select Action -> Service Catalog -> Get Catalog Variables.
2.Select the Source Record:
Submitted Request: Drag the Requested Item Record data pill from your Trigger (e.g., Trigger -> Requested Item Record).
3.Select the Template (Catalog Item):
In the Catalog Item field, search for and select the specific Catalog Item that contains your MRVS.
4.Select the MRVS:
Once the Catalog Item is selected, a list of available variables will appear in the Available column.
Look for the name of your Multi-Row Variable Set.
Click the arrow (>) to move the MRVS from the Available column to the Selected column.
# Step 2: Setting up the 'For Each' Loop
1. Add Flow Logic:
Click the icon after your 'Get Catalog Variables' step.
Select Flow Logic -> For Each
. Select the MRVS Array:
In the Items field, you need to provide the MRVS array.
Look at the Data Panel on the right.
Expand the Get Catalog Variables step
Find your MRVS Name data pill and drag it into the Items field
# Step 3: Populating the Catalog Task Description
1.Add Action (Outside the Loop):
Ensure you are adding this action after the 'End' of the For Each loop.
Select Action -> Service Catalog -> Create Catalog Task
2. Configure Task Fields**:
Requested Item**: Drag the `Trigger -> Requested Item Record` pill.
Short Description**: Enter a relevant title (e.g., "Process MRVS Requests").
3. Map the Description:
Find the **Description** field in the action configuration.
In the **Data Panel** on the right, scroll down to the **Flow Variables** section.
Drag your `varTaskDescription` (or whatever you named it) into the Description**
Final Flow Structure Check:
1. Get Catalog Variables** (Surfaces MRVS)
2. Set Flow Variable** (Initialize as empty)
3. For Each (Loop through MRVS)
Inside Loop:* **Script Action** (Build string)
Inside Loop:* **Set Flow Variable** (Update with new string)
4. Create Catalog Task** (Use the Flow Variable in Description)
If this response proves useful, please mark it as Accept as Solution and Helpful.👍🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hii @riyaz150819
Make flow steps in this way , first use "For each item" -> then use "look up record"
💡💡If you find this any helpful, give a thumbs up and accept the solution ✔️.
Regards,
Abhishek
Technical Consultant
