How to use a DataTable from a DataTable List in a For Each Row (Data Table)

studio

#1

Hi everyone,

I have a list of Data Tables and I want to, for each Data Table from that list, do a for each row.
Please see the image below that explains better what I want to do:

Can anyone help me with that?

Kind Regards,
Francisco


#2

You can do that by changing the type of item.Capture


#3

Please add your XAML file. I think you must take care in the ForEach activity to declare the item type as DataTable

image


#4

Hi @ravisangam

Changing the type to queue item?


#5

Hi @dineshary.

As we can see in the attached screenshot, the TypeArgument in the For Each activity is already DataTable


#6

Hi @FranciscoAraujo,

you have used Array of DataTable (System.Data.DataTable). Instead select system.Data.Datatable. It is not an array.

Type of each item object must be specified.


#7

Oh, of course.

That’s it! Thank you :wink:

Best regards


#8

Yeah it should be dataRow


#9

@dineshary @ravisangam you know how can I get the DataTable name?

KR


#10

item.TableName will give you the name of it. I am not sure. give it a try


#11

If you didn’t gave name at the time of creation, it will return Nothing.
The default value of the datatable should be
New DataTable(“tablename”).
Then if you run dt.TableName, it will return “tablename”


#12