Hello,
I currently have a process that Connects to a db, Runs a query, and builds a datatable. Two fields in the datatable output need to set variables inside a loop.
Can someone help me select the appropriate loop and set the variables? Each row in the datatable is setting the variables.
thanks,
tim
Hi tim,
Please check the image below:
Hope it helps you!
pikorpa
(Piotr Kołakowski)
February 20, 2024, 8:42pm
3
Hey @timothy.mullady
Here’s a simplified visual representation of workflow :
Database Connect → Connect to your DB
Execute Query → Store results in dtResults
For Each Row in DataTable (dtResults)
Assign (variable1 = row("FirstColumnName").ToString)
Assign (variable2 = row("SecondColumnName").ToString)
etc.
postwick
(Paul Ostwick)
February 20, 2024, 9:03pm
4
You don’t need to set variables. Just use CurrentRow(“ColumnName”).ToString to get the values inside the loop (For Each Row in Data Table).
The query activity returns a datatable, you don’t have to build the datatable.
system
(system)
Closed
February 23, 2024, 9:04pm
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.