Need Help with mrvs in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 02:28 PM
Hi all,
I can't use look up record in multi row variable set while using for each in flow designer .the field I am trying to access in multi row variable set is lookup select box, is there any way through which I can use look up record in multi row variable set.
- Labels:
-
flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 08:24 PM
Hello @tyagi_amrit2701
In Flow Designer, when using a For Each loop on a Multi-Row Variable Set (MRVS), you may face issues accessing Lookup Select Box values. This happens because Lookup Select Box fields store reference values as display names, not sys_ids, which causes problems when trying to fetch records using the "Look Up Record" action.
The way to go around this would be to retrieve the sys_id of the lookup value and then add Look Up record. Now to retrieve the sys_id you need to add a script action - custom action.
(function execute(inputs, outputs) {
var lookupValue = inputs.lookup_select_box; // This holds the display value
var gr = new GlideRecord('your_lookup_table'); // Change to the correct table name
gr.addQuery('name', lookupValue); // Adjust this field based on your lookup table
gr.query();
if (gr.next()) {
outputs.sys_id = gr.sys_id.toString();
} else {
outputs.sys_id = "";
}
})();
Use the sys_id from the script output in the Look Up Record action.
Kindly mark my answer as helpful and accept solution if it helped you in anyway,
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 08:29 PM
Hi @tyagi_amrit2701,
Unfortunately, you cannot use look up record in multi row variable set. What you can do, is to get your MRVS. It will be an array of JSON. You can parse it and apply your logic.
You can create an action in Flow Designer, which can be given the MRVS as an input, then parse it to JSON and return the outputs you need.
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 09:29 PM
I believe you can access the MRVS lookup select box in flow using for each.
See below how I accessed it:
What is the issue you are facing? Share the flow if you can.
Happy to help
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 11:44 PM
Hi @Murthy Ch
Please find the screenshot of the error @Ankur Bawiskar I've done it similarly as you've mentioned but it's not working please find the error screenshot instead of sys id i've used display name as well but no luck