Assign: Object reference not set to an instance of an object!

Hi all,

I am trying to assign a column into a data table. Everything looks good but when I run it, it says that the object reference is not being set to an instance of an object. Have searched online and did not find anything that helped. Can anyone please kindly guide me? Thanks!

1 Like

Hey @k.d, Welcome to UiPath Community

Please make sure you have initialized the DataTable or the DataTable holds some value before it reached assign.

And can you please elaborate like you are retrieving GST number from DT to that variable ?

If yes, try using dt("").toString or dt(<ColumnIndex).toString

Thanks :slight_smile:

Hello @k.d,

This error is faced whenever you try to assign Blank value or no value.

I suppose you want to add column to data table for this purpose you can use Add column activity present in UIpath itself also it has various option like you can mention the index of where you want to add the column.