Passing Variables after each row


#1

Hello,
I have an excel sheet and each column would be a different variable value. For each row I am assigning the value to the variable, but it doesn’t seem to pass to the next workflow.
Example 2 rows, 2 columns - column 1 is start date, column 2 is end date
i want to grab the values in row one then pull the report, save it, come back to row 2 values, pull the report, save it.
when I have invoke workflow to pull the report, the values are not passed.
What should I do?


#2

If I understand you correctly you are going through the rows of the spreadsheet one by one, pulling the report criteria from the spreadsheet, then for each row you are using invoke workflow to run the report and need the criteria (begin and end date) passed to that newly invoked workflow. If that’s right this might help:


#3

I can understand that but the for each row it is not working for me to pass the variable.
I would like to continue using the row1 variable into the second workflow, finish my process there and come back to do the same thing until all rows go through.

I am attaching the file, a2 invokes a1 that loops through excel document with 2 rows.
It is not doing what I want - I need helpa1.xaml (10.4 KB)
a2.xaml (4.9 KB)
variables.xlsx (9.1 KB)


#4

Hi @anna.strygina-kay,

i saw your code in a1.xaml file you created Start_Date in variable and also in arguments also.

if you are assign a value the first priority will give to variable only and it will not assign to argument.

so dont use the duplicate name in variable and arguments its must be unique.

please use this xaml

a2.xaml (4.9 KB)
a1.xaml (10.2 KB)
variables.xlsx (9.1 KB)


#5

Thank you for clarifying that. After I run the automation, out of my workbook where I only have 2 variables, the a2 workflow gives me 3 messages. 1st row, 2nd row and 2nd row again. It looks like it runs the loop in a1, then grabs the last variable and passes that to a2

I really need help figuring out just to run 1 loop. Would it be flowchart and not sequence? Someone please chime in


#6

Hi @anna.strygina-kay,

use break activity to stop the loop.

Regards,
Arivu :slight_smile:


#7

but I don’t want to break the loop. I want to do it for all 2 rows