Get Values out MRVS in a Flow Script

Meloper
Kilo Sage

I have 3 MRVS on a Record Producer

 

1. i already use Get Catalog Variables

2. i use a for each loop for 2 of the MRVSs

 

For the 3 MRVS i just need the String Values for a Description Field.
This MRVS has 1 Variable "year".

Maybe user creates 3 rows with values 2017,2018 and 2019.

in one of the for each loops (Step2) i know only need the 2017.2018.2019 as a String in the Description, how can i do this?

4 REPLIES 4

Soeren Maucher
Mega Sage

Hello @Meloper

in your for loop, in each iteration you can update the Description field with the already existing description + the year of the current loop. This way, your Description will look accordingly after each loop iteration. After the last loop the Description will look like required.  
1. Loop: --> Description = 2017
2. Loop: --> Description = 2017 2018
3. Loop: -->Description = 2017 2018 2019

Please the following Flow designer screenshot how to achieve this below. 

SoerenMaucher_0-1675754309290.png


I hope this helped!

Greetings, 
Sören

Unfortunately, I need the string value inside a fixed text.
i also can't run the MRVS in a for Each.
Because we are already in another For each loop of another MRVS.

Anil Lande
Kilo Patron

Hi,

Are you using flow to set values?

You can use Record producer script and use below logic to populate description:

var mrvs= producer.mrvs_variable; // access the MRVS variable
var totalRows = mrvs.getRowCount();
var description = '';
for (var i = 0; i < totalRows; i++) {
description = description + mrvs.getRow(i).getCell('year').getCellDisplayValue() +', ';
}
Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

no, i dont use the flow only to set value.
I use a for each loop do open a new task for every row in 1 MRVS.
and for each new record created by this loop, if have to set a description.
In this discrption, i need also the values another MRVS, but not row for row.
text + rows form mrvs (,) + text