Add Row Activity using DataRow property

I have never seen a single example using the DataRow property of Add Row Activity. Every example uses the array row.

eg. {A,“B”,3} or I tried a row.ItemArray and it worked in a loop situation.

I have not figured out nor have I seen documentation to try the other property. I’m not sure it would provide any advantage but it would be nice to know.


Datarow property is used when u are in for each row and when you want to append specific rows to another datatable based on condition then you can mention ‘row’ in datarow property of add data row activity.

I know but unfortunately it never works the different ways I’ve tried. I assumed to use a object.

Hi @AlienV

One use would look like that:

You can generate a new row from any given data table and that row will contain the exact same amount of columns. Might be useful if you want to then edit the values of that new empty data row and add them to the data table :slight_smile:

1 Like

Thanks @loginerror , but I meant adding a populated row to a Datatable using the Add data row activity. I tried putting a variable which was a populated object in the Datarow property of the activity. No luck.

You might need to create your DataRow variable using the method I posted above, then populate and then add it via Add Data Row activity. It needs to follow the structure of the data table and this is one way to achieve that.

Could you post a screenshot of the error message or other issue you are having?

1 Like

I am new to UIPath. Wanted to know how can we use the DataRow property in Add Data Row activity. I want to add a column to an existing data table.

I am trying to add the values of 2 columns (A & B) and show the output in a third column C. I was able to do it using the Array Row, however not sure how to do this using Data Row property.

Welcome to uipath community
If we have Input in a form of individual values or as variables then ArrayRow property in add Datarow activity
If we have a value in DataRow datatype then only we can use the property in add Datarow activity
And to get that datatype of value we need to get from a datatable like this
Which will give us a Datarow value which can be passed as value to the Datarow property in add data row activity

Cheers @Sagar_Gupta

I am not allowed to share attachment as I am new user. Sharing you the xaml file of the workflow. If you can kindly explain how we can do this.

Thanks a lot for your support.