Add Data Row to a Data Table

I have put in an activity to Build a Data Table. It only has one column, TotalDue (Int32). Below that I added Add Row to Data Table. Chose that Data Table and then in the ArrayRow field I put in the variable that I wanted added in curly brackets {TotalDue} which is a variable of Int32. I get an error that says (2): error BC30311: Value of type ‘Integer’ cannot be converted to ‘Object()’.

What can I do to correct this???

Hi @karen.c.stewart4.civ ,

Maybe try using the below Expression :

new Object(){TotalDue}
1 Like

Hi @karen.c.stewart4.civ

  1. Change the data type of TotalDue variable from Int32 to Object.
  2. In the Add Row to Data Table activity, create an array variable with one element of type Object.

Regards,
Kaviyarasu N

Hi @karen.c.stewart4.civ

It should not give error as both are same datatype.
Try these 2 solutions It will help you.

  1. Either change the TotalDue column datatype to object and keeping variable datatype as integer.
  2. Else restart the studio it might work.

It works fine. Mark as solution

Hi @karen.c.stewart4.civ ,

Can you check the column data type in build datatable whether it is Int32 as below,
image

I’m able to add the Int32 value to datatable as shown in below screenshots,

Also cross check if you are adding value to a different datatable and let us know if you are still facing the issue?

That did the job. Thank you so much. I thought that it had to have something to do with it being initialized! Much appreciated!!

1 Like

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