Add data row always through "Add Data Row: Object reference not set to an instance of an object"

I have workflow having add Data row activity which always through “Add Data Row: Object reference not set to an instance of an object”.

After lot of research i found that input to “Add Data row activity is blank” but i am successfully passing the “Data row”.

Thanks in advance for help.

2 Likes

Hi @sandipauti
Can you explain in details where is the exact problem so it will be helpful to understand.
Thanks & Regards

@jitendra_123, I had workflow which contains following activity.

  1. I had build data table activity.
  2. I had created data_row variable having type data row. and initialize value to that variable.
  3. After that i have added Add data row activity. and provide “data_row” as input.

but it is always through above error.

Hi,

Can you please refer the below article. Here it is explained how to add data row to a data table.

Regards,
Karthik Byggari

@sandipauti

Please Check these things.

  1. After Building DataTable, Check in Prioperties whether you have assigned a datatable variable.
  2. Then In Add DataRow Activity check whether you have added the same datatable variable.

Regards,
Mahesh

4 Likes

@MAHESH1 - Thanks for you quick response but i have checked both variable are same.

Hu @KarthikByggari - thanks for quick help.

1 Like

@Sandipauti

If you want to Add Empty DataRow To a DataTable.

Then You have to initialize the DataRow.
DataTable Variable.NewRow

In Properties of Add Data Row
In DataRow Feild
Let us take you are having a DataTable dta
dta.NewRow

Regards,
Mahesh

@MAHESH1 - Got right solution from @KarthikByggari post … but thanks for your help too.

1 Like

WOW thank you, this helped a complete stranger

Hi,

i went through this link but when i downloaded the workflow from there to see the example it is showing as missing activities .is it due to the uipath version that i am using . i am using uipath version 2019.10.2.

Regards,
Ankita Verma.

@Ankita121 - It will automatically try to fix version. just close and open it again, if not then take backup of project.json and delete it and try to open xaml file again.

Hi Sandipauti, please have a check this demo may help: