Differences between row() and row.ItemArray()

Hello everyone,
I’m a beginner in RPA world and I’d like that someone could answer to this question:

What is the difference between row() and row.ItemArray()?

Let’s assume that we’re working with Data Tables, we’ve just iterated our Data Table variable and we want to refer to the first element of the first column; can I refer to it both using row(0) and row.ItemArray(0)?

Thank you :face_with_monocle:

1 Like

Hi @valerio.boffino ,

Lets assume we have 5 rows and 3 columns

123
456
789
102
123

row(1) refers to 2nd row (i.e 4 5 6) - refres to whole row
row(2).ItemArray(1) refers to 3rd row and 2nd column (i.e 8) - refers to single cell

3 Likes

Hi @valerio.boffino !
To add another use case for row.itemArray(), we use it when we want to add a specific row to another datatable (to avoid the error “this row already belongs to another datatable”)

1 Like