- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 11:58 PM - edited 07-24-2024 12:06 AM
Hi Team,
I've a MRVS named 'Laptop Models' in which I've two variables (select box, single line text).
Select box variable has two options: Windows and Mac.
User will select either anyone laptop model or both and submit the form. We need to trigger two separate catalog tasks if both options are selected for a single RITM.
To achieve this, I created two flow variables (Dell, Mac) with type 'True/false' and wrote the below script to assign the answer to each flow variables.
If any of the flow variables are true, then I'm triggering the catalog tasks separately in the flow. But, I couldn't get all the rows output if I do like this and also I'm not getting any value in flow variables. So, my flow ends with a error and proceeding further.
Can anyone please suggest on how to achieve this?
Thanks,
Nivea.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 12:19 AM
Hi @nivea ,
The better way would be to use "For each" condition, it's literally very useful for MRVS.
check this article for reference : https://www.servicenow.com/community/workflow-automation-articles/how-to-use-multirow-variable-sets-...
Thanks.
Hope it helps.
you can mark it helpful and accept solution, if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 12:18 AM
Hello @nivea ,
For iterations generally "For each" loop used in the flow. So, for your case you can use MVRS 'Laptop Models' variable in "For each" loop so it can iterate for each value present in the MRVS i.e., Windows and Mac.
Then you can add if blocks for both options i.e., Windows and Mac. and add create catalog task for each if block resp.
Thank you!!
Dnyaneshwaree Satpute
Tera Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 12:23 AM
Hey @Dnyaneshwaree ,
Thank you so much for your suggestion!
As you can see my MRVS in the below image, users will add both options in a request as Laptop is a select box variable. Can you elaborate more on how to iterate through each lines in the select box variable value by using "for each" loop if I select the MRVS in it.
Thanks,
Nivea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 12:19 AM
Hi @nivea ,
The better way would be to use "For each" condition, it's literally very useful for MRVS.
check this article for reference : https://www.servicenow.com/community/workflow-automation-articles/how-to-use-multirow-variable-sets-...
Thanks.
Hope it helps.
you can mark it helpful and accept solution, if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 12:44 AM
Thank you so much @HrishabhKumar for sharing the article !