Error on an assign activity - Object reference not set to an instance of an object

I’m getting error on my assign…

Assign
LocationName = CType(in_Config(“Location”), Dictionary(Of String, String))

Location Name is a Directory of (String, String)

i do not understand why its giving me error - Assign: Object reference not set to an instance of an object.

Check your in_Config dictionary. It may not be passed correctly as an argument and is therefore null/nothing. If you’re using this in Main.xaml, it should just be Config and not in_Config.

Hi @Latif,

This issue occurs when one of your variables is null. Run your code in debug with the locals panel open, you can see which variables are blank when the code throws an exception

it also shows null…how to correct this for removing the error??

I’m not sure what you’re trying to do but I’m 99% sure this isn’t close to the way to do it.

What is your goal? Converting a string value to a dictionary makes no sense.

1 Like

Hi @guptasweb,

What datatype is your null variable, and how are you filling it?

Hi @guptasweb,

What is the expression you’re assigning to From_ID? I would imagine item has a value but is there anything else you’re referring to?

i want to extract the information of outlook i.e from,to,date,subject in excel… somehow all the information is extracted except ‘date and to’ is not extracted…
in From- it shows object reference not to set an instance of object and in received date it shows blank…wht to do??

There are many threads on this.

1 Like

Hi @guptasweb,

As @postwick has said, there are a few threads which will have your answer.

May also be worth checking this link:

@guptasweb Try this

From_ID = message.From.ToString