Add data row after build data table

Hi,
I have built a data table with different data types string, boolean, number and Date.
How do I add rows to this data table using Add data row. Do I need to follow formatting?

Thank you.

@A_Learner - Try this out and adjust it to your needs.

Thank you. getting an error.

@A_Learner,

Pass the ArrayRow like this.

{"John Doe", True, 30, new DateTime(2024, 11, 19)}
1 Like

Thank you. Getting error too. Option strict on converting int to string, date to string etc.

@A_Learner,

It’s your column sequence mismatch. Can you show the columns and their datatype of datatable?

Depend on the column datatype, we will have to pass the values.

1 Like

yes, I am matching sequence. Strangely it is allowing strings only. Any other data types throwing error.

@A_Learner,

Here I tried to replicate this.

Datatable:

Code:

I changed the ArrayRow to this as it was giving me the same error. Try the below in ArrayRow this should work.

New Object() {"John Doe", True, 30, Now}

Output:

I am trying in Studiox. Still giving me an error saying value of object cannot be converted to datarow. Just strings and int. Removed date to be simple.

@A_Learner,

Put it in Add list as row like this.

1 Like

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