Cannot add a datarow of arguments to an existing datatable

Hello all,

I’m running into an issue with a datatable I cannot solve. In the Initialization phase, I have built a datatable consisting of the following columns:

Then, later on in the Process workflow, I want to add a datarow to this datatable with the Add Data Row activity as such:

As you can see by the red exclamation point, this throws an error: Validation Error (2) : error BC36915: Cannot infer an element type because more than one type is possible. Specifying the type of the array might correct this error.

The types of the arguments all correspond to the ones in the datatable and I have no idea how to set the type of the ArrayRow. Can anyone help me?

Thank you in advance.
Regards, Bas

Hi @bas.henssen,

Add .ToString to all the variables in that array. Add datarow will automatically converts it to respective datatype.

@bas.henssen

You can add New Object() {var1,var2...}

New .net framework is strict on datatypes

cheers

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