Create a Workflow to Loop Through a Table by Row and Column
In this scenario, you can create a table and a nested while-loop through each row and each column.
Loop Through a Table by Row and Column
To use the nested while-loop through each row and column:
- Create a new workflow.
- Add activity CreateMemoryTable.
- In the Table Name field, enter a name for your table.
- In the Columns and Rows fields, specify the number of columns and rows you need.
- Add the column names.
- Populate the table with data.
- Add activity GetRowsCount and add a name.
- In the Table Variable field, add the name of your table as a variable.
- Add activity GetColumnsCount and add a name.
- In the Table Variable field, add the name of your table as a variable.
- Add a While control to loop through the table.
- In the Counter field, add the name of the GetRowsCount activity as a variable.
- Add another While control in the loop.
- In the Counter field, add the name of the GetColumnsCount activity as a variable.
- Add activity GetCellValue.
- In the Table Variable field, add the name of your table as a variable.
- In the Row Number field, add the name of your first While control as a variable.
- In the Column Type field, select Number.
- In the Column Number/Name field, add the name of your second While condition as a variable.
- Save and run the workflow to view the Workflow Execution Log.