Get value of data row variable

Hello,

I have a data row variable and would like to see the value of it. I have used this log message:
image
But this only gives me System.Data.DataRow in the logs

Is there a way of configuring the above to give me the actual data in the variable?

Cheers

Hi @E.T.S

Assign activity:
logMessage = String.Empty

For Each column As DataColumn In yourDataRowVariable.Table.Columns
    logMessage = logMessage + column.ColumnName + ": " + yourDataRowVariable(column).ToString() + Environment.NewLine
Next

LogMessage activity:
Log Message: logMessage

Regards

A DataRow is a complex object, you can’t just convert it to string.

If you want to see the values in the DataRow you use the ItemArray property and Join it into a string:

String.Join(",",drCorrespondingRow.ItemArray)

2 Likes

Thank you I can see the value now

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