inConfig gives Error: Object reference not set to an instance of an object

Trying to get value from Name (MyFileUrl) … from Settings Tab in Config file.

Using Assing activity:
UrlAddress = inConfig(“MyFileUrl”).ToString

Trying to output URL and it gives error.
Object reference not set to an instance of an object

Have this code in Process file - Checked the name in Settings many time still not getting url from config file.

in such case we would do:

myConfigDictVar.Keys for getting all keys

Hi @Ellen

Object reference not set to an instance of an object normally occurs when a variable is null. Try putting a message box before the activity that breaks, run in Debug mode with the locals panel pinned, and look for a null variable involved in the activity once you’ve reached the message box.

Hope it helps!!

I checked everything… it has null value…

I’m getting asset through get asset activity… but when i set something its not working.

when debugging and inspecting the value you can easy identify the location where it stays null or becomes null

Can you specify how are you storing the Asset value with the help of screenshot.

Regards,

image

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

image

inConfig looks like it is passed from somewhere (e.g. Invoke Workflow). So as mentioned above

you can check where the Config Dictionary is properly populated and where inConfig is stays null by debugging and inspections