NHoe
(Norman)
November 25, 2021, 1:43pm
1
Hello all,
I am currently working in FlowChart and read in a datatable and run through it row by row, this works.
Now I am faced with the challenge of wanting to read out the respective cell, this works with the activity Read Cell. To do this, I have set the row number from the counter after the column letter.
Is there another way to read out the range, for example via Assign row.Item(“Column header”).ToString similar to the for each activity and include the variable for the row instead of always using the Read Cell activity?
prasath_S
(prasath S)
November 25, 2021, 1:47pm
2
Hi @NHoe
Please try
Dt(index)("columname").tostring
Index is your counter variable
thanks
Hi @NHoe
Use Can Try with For each Row in datable and Use Currentrow("YourColumnname).toString
Regards
New_Bot
November 25, 2021, 1:50pm
4
in this case i would like to select the date
but the thing is i am unable to select the dropdown
NHoe
(Norman)
November 25, 2021, 2:04pm
5
i try this but i get a error
prasath_S
(prasath S)
November 25, 2021, 2:05pm
6
@NHoe is ziele variable a integer?
Thanks
NHoe
(Norman)
November 25, 2021, 2:06pm
7
@pravin_calvin Thanks for the tip, however I do not want to use a for each activity in the flowchart as the classic sense does not make sense to me.
prasath_S
(prasath S)
November 25, 2021, 2:10pm
9
@NHoe
Please try,
Dt.Rows(index)("columname").tostring
Or if your project is based on c# try below,
Dt.Rows[index].["columname"].tostring
And also what is the error you are getting, it’s not in english so couldn’t understand it.
Thanks
NHoe
(Norman)
November 25, 2021, 2:15pm
10
i try this Dt.Rows(index)(“columname”).tostring and get the Massage Assign: There is no row at position 2. but in this datatable is a value
prasath_S
(prasath S)
November 25, 2021, 2:17pm
11
@NHoe
Is your datatable variable name is dt?
If yes can you confirm its row count by using a message box and the syntax dt.rows.count.tostring
Thanks
NHoe
(Norman)
November 25, 2021, 2:21pm
12
prasath_S:
dt.rows.count.tostring
Yes, the number of rows from inputDT.rows.count.tostring is 98
prasath_S
(prasath S)
November 25, 2021, 2:29pm
13
@NHoe
May I know what is the syntax used in assign?
Thanks
NHoe
(Norman)
November 25, 2021, 2:32pm
14
sure
ZeilenCount=inputDT.Rows.Count
Test=inputDT.Rows(Zeile)(“Test”).ToString
Zeile=Zeile+1
Variables:
ZeilenCount as integer
Test as String
Zeile as integer
prasath_S
(prasath S)
November 25, 2021, 2:41pm
15
@NHoe is the error occurs first time itself or is there after some iterations and also if you can share your workflow and input file (delete all the important information in it before upload)
Thanks
NHoe
(Norman)
November 25, 2021, 2:49pm
16
Yes, gladly, I customise the workflow and make it available right away
NHoe
(Norman)
November 25, 2021, 3:20pm
17
prasath_S
(prasath S)
November 26, 2021, 5:25am
18
Thanks will look into it.
prasath_S
(prasath S)
November 27, 2021, 7:10am
19
@NHoe
Made some adjustments, please check
Main (1).xaml (18.9 KB) and let know if anything is required.
Thanks
1 Like
Hi
If you want one specific cell value on a datatable then use the below expression in a assign activity
Stroutput = Dt.Rows(rowindex)(columnindex).ToString
Where stroutput is a string variable
Dt is your datatable
rowindex and column index both starts with 0 for first row and first column
Here instead of column Index you can also mention column name like this
Stroutput = Dt.Rows(rowindex)(“ColumnName”).ToString
Or
If you want each cell value of a particular column one by one then use the below steps to get them
Use a assign activity like this
counter = 0
Where counter is a int32 variable
Then use a while loop activity and mention the condition like this
Counter > dt.Rows.Count
Inside the loop use a assign activity like this
stroutput = dt.Rows(counter)(“column name”).ToString
Inside the same use a assign activity like this
counter = counter +1
This will assign each cell value of a column one by one to the stroutput variable
Cheers @NHoe
1 Like