Hi All,
I have a datarow passed as an argument from another workflow. I want to display all the values in the Datarow. How can I achieve that? I tried for each loop but I get the below error
Please help
Hi All,
I have a datarow passed as an argument from another workflow. I want to display all the values in the Datarow. How can I achieve that? I tried for each loop but I get the below error
Please help
Hi there,
Inside the body, to see the values you can put:
For example, imagine you have a DT with next columns, Col1: Age ; Col2: Name ; Col3: Description
So, eg: item(“Name”).ToString will get the name of each row of the DT
Bests,
Pablo
It appears that your in_DataRowtoProcess variable is a DataRow. I am going to assume that is the case in my text below.
There are a couple of approaches to it: either get the column names and use those, or go by index:
Pseudo-code would look like…
DataTable yourDataTable
DataRow in_DataRowtoProcess = row from yourDataTable
foreach (DataColumn column in yourDataTable)
print in_DataRowtoProcess(column.ColumnName)
Pseudo-code would look like…
DataTable yourDataTable
DataRow in_DataRowtoProcess = row from yourDataTable
int counter = 0
while (counter < yourDataTable.Columns.Count)print in_DataRowtoProcess(counter)
counter = counter + 1
Hope this helps.
Hi… I tried this already, but it din’t work because, the datarow is passed from another workflow so the column name is unknown.
Hi @Pablo_Sanchez and @ANSI thank you for your response.
I found a way to resolve it. I passed the values as an array of strings and extracted through index
Glad it worked for you, but the DataRow being from another flow should have no effect on it’s column names.