How to initialize a DataRow[] array in uipath

I am using a DataRow array variable ‘selectRow’ ,

1 Like

Hi @mailsmithash ,

Please try yourDT(0)

Best regards,

Setting that selectRow to as follows:

But when this row length is checked for 1 and an element is tried to be retrieved from the row at 0 index, ‘selectRow(0).Item(“Amount”)’ getting array index of bounds exception. So i want to initialize the array to one DataRow. So i can always find the element at the one row at 0 index.

1 Like


if you want to declare an array in VB, you should use this:
New DataRow(1) {}

But you have to determinate the size of the array, another option is to use a list.

Regards, Giovanni


Thanks so much that solves the issue.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.