Write Line: Object reference not set to an instance of an object using data table variable

I need assistance of understanding as to why I am getting an error here. Is it because I cannot write line a data table variable because on each row the variable is indeed a data table but on the write line I added a “.toString” at the end. There an alternative?

Also in my previous sequence the read Range is “nonDDContracts” so that it can be passed over to the next sequence which has the each row.

@wendy Normally that Error occurs when the Object used is Null or Empty. Hence, it won’t be able to Output the Data.

Also If you want to Output the Datatable values, you must use Output Datatable Activity to convert the Data to String, and use that String variable in Write Line.

1 Like

So it’s only right if i put a output data table activity before the write line to initiate the data to string activity? So output data table is basically a conversion tool to convert data table variables to string variables?

@wendy Yes

I tried it and it’s still not working

This is the result, not sure if it’s the position placement.

This is the last part of the previous process I created in the other sequence that’s connected to that error:

Activity 'Output datatable 'does not have an output variable. Assign output variable and then writeline that variable to see if the datatable contains your data.