Exception has been thrown by target of invocation - DataTable

I am getting the aforementioned error on assign activity.

row(“Remark”) = “Not Valid”

The code is getting looped in a DT. I checked with the name of the column, which seems ok as well as the Null values. I am using another assign operation a stage before this, which is working fine! Not sure what is the cause.

@Ayush_Purohit_IN,

Could you please share your workflow and will check it.

Hi @Ayush_Purohit_IN,

To check null like below .

image

or

 "row("Remark") is DBNull.Value"

To get the value like below.

"row.Item("Remark").ToString()"

or

"row("Remark").ToString()"

Regards
Balalmurugan.S

3 Likes

Guys,

For me it was throwing the same exception. Here is the screenshot. Please suggestCapture

@ushu,

Try below one:

var_Data_Row(“Total Records”).Tostring

If I use .Tostring it was showing an error.Capture Invalid L-value expression

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