Ellen
(Ellen )
August 29, 2023, 8:23am
1
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.
ppr
(Peter Preuss)
August 29, 2023, 8:28am
2
in such case we would do:
myConfigDictVar.Keys for getting all keys
Parvathy
(PS Parvathy)
August 29, 2023, 8:28am
3
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!!
Ellen
(Ellen )
August 29, 2023, 10:35am
4
I checked everything… it has null value…
I’m getting asset through get asset activity… but when i set something its not working.
ppr
(Peter Preuss)
August 29, 2023, 10:38am
5
when debugging and inspecting the value you can easy identify the location where it stays null or becomes null
Parvathy
(PS Parvathy)
August 29, 2023, 10:39am
6
Can you specify how are you storing the Asset value with the help of screenshot.
Regards,
Ellen
(Ellen )
August 29, 2023, 10:44am
7
Assign: Object reference not set to an instance of an object.
ppr
(Peter Preuss)
August 29, 2023, 10:52am
8
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