Addition of values in a DataTable with ForEachRow

Hello, everybody.

I have three DataTable (DataTable1, DataTable2, DataTable3) which I create with the Build Data Table activity.

Each Data Table has two Int32 columns.

The columns in DataTable 1 and DatatTable 2 are filled with numbers. The columns in Data Table 3 are empty.

Now I want to perform the numbers from DataTable1 column 1 + DataTable2 column 1 and write them to DataTable3 column 1. The titration should be done in a For Each activity.

The Assign activity includes:
var_DataTable3(var_IndexForEachRow)(0) = Convert.ToInt32(var_DataTable1.Rows(var_IndexForEachRow)(0)) + Convert.ToInt32(var_DataTable2.Rows(var_IndexForEachRow)(0))

My error message:
Assign: Cannot create an L-value from the given expression with property ‘set_Item’ because the target object is null.

Hi,
use brackets outside and a .tostring

(ToInt32(var_DataTable1.Rows(var_IndexForEachRow)(0).tostring) + ToInt32(var_DataTable2.Rows(var_IndexForEachRow)(0).tostring)).toString

Unfortunately, it’s not helping.

Error message:
Assign: Cannot create an L-value from the given expression with property ‘set_Item’ because the target object is null.

Can you check in the message box that you are getting the values before the assign statement.

DataTable1
Datatable1

Datatable2
Datatable2

DataTable3
Datatable3

Perhaps the problem can be better understood with the XAML.
Test.xaml (12.3 KB)

Please convert Left side value to int32 datatype, while using assign activity both datatype should match