(Object reference not set to an instance of an object)

Need quick assistance

Need quick assistance with the attached screenshot. i just dont find my documentation so a little help will go a long way please.

Hi @jans.delossantos

either the dataTable, in_Config or st_TrackManagerFileName is null.

check it on Immediates panel

Most likely it is ‘in_Config’.

Hi @jans.delossantos

Check what’s coming in your in_Config. have you initialized it?

If yes, have you passed in_Config to the workflow where you are trying to use it?

You can put a breakpoint on this activity and run in debug mode.

Then check from locals panel if there is anything in that config file path you are trying to use.

You probably clicked Run/Debug for a XAML file with arguments, so those arguments (like in_Config) aren’t populated.

Hi @jans.delossantos

  • Make sure the Excel file path is not empty and the file exists
  • Verify the sheet name is correct
  • Ensure the output DataTable variable is created and assigned
  • Confirm any variables used in Read Range are initialized

Most of the time this error is just a missing or empty input in Read Range.

Hi @jans.delossantos

Object reference not set to an instance of an object means one of these is Nothing (null):

in_Config("TrackManagerReportFilePath")
st_trackManagerFileName

Could you log and check if values are coming for these two parameters?

Regards
Gokul

@jans.delossantos

As per error one or more variables used in the activity are empty are not initialized

Mostly it is in_config..may be its not mapped in invoke workflow

cheers

Hi @jans.delossantos,

That error Object reference not set to an instance of an object is most likely caused by either in_Config being null or st_TrackManagerFileName being null or both are null.

Please verify that in_Config is correctly passed when calling the workflow. If the Config is not being assigned to the in_Config argument, this could be the cause of the issue.

Also, try logging st_TrackManagerFileName. If it doesn’t return any value, that could be the source of the error as well.

Hope this helps.

1 Like