Hi,
I have a datatable with several values:
But when I access the datatable with for each row I can get no value:
And the data row has the following value:
DataRow { HasErrors=false, ItemArray=object[2] { , “ALCOO1N” }, RowError=“”, RowState=Added, Table=[TableName] }
May you tell me what the problem is?
Thanks in Advance
Regards
@Juan_Carlos_Zazueta
lakshman
(Ganta lakshman)
November 14, 2019, 12:36am
2
@Juan_Carlos_Zazueta
Could you please check the Input data once and i guess that cell value is empty.
@lakshman
I Did a Change and now row has the value:
DataRow { HasErrors=false, ItemArray=object[1] { “ALCOO1N” }, RowError=“”, RowState=Added, Table=[DataTable] }
And the datatable has the following values:
But in the for each row only I Get the value “ALCOO1N”
Why?
Regards
lakshman
(Ganta lakshman)
November 14, 2019, 2:03am
4
@Juan_Carlos_Zazueta
For each iteration you will get one row value only.
@lakshman ,
Yes but the datatable has two elements and for each row only get the second one.
What is wrong?
lakshman
(Ganta lakshman)
November 14, 2019, 2:15am
6
@Juan_Carlos_Zazueta
In that case it will be Data row and we can’t print DataRow directly using message box.
If you want to print rows at a time then try below expression.
row("Column1").Tostring+"-"+row("Column2").Tostring
Use column name while accessing it, instead of column index if you’re trying with index, as lakshman has given example
gilles.b
(Gilles)
November 15, 2020, 8:45pm
8
Hi,
Is it possible that you used Build Data Table activity and did not remove the second blank row proposed in the wizard ?