Error : "Dictionary has not been initialized"

Hi All,

I’m trying to send outlook mail by passing values from Config Files. But I’m Facing an Error as shown in the screenshot.

I have found few solutions on Forum that didn’t work for me:-

  1. When I try to add default value as " New Dictionary(Of String, Object)" I’m getting error as shown below.
  2. I’m not finding “Dictionary” DataType instead of “IDictionary” DataType.

Thank you in Addvance:-)

You have your ConfigFile variable scoped to SendOutlookMail. You should scope it higher. You probably have more than one ConfigFile variable defined, which causes these kind of unexpected results. Use the Studio search and it’ll show if you have it defined more than once.

Dictionary is there, you just have to search in the browse for types window. It’s under System.Collections.Generic

SendOutlookMail is my Custom Sequence Name which is highest scope.
I couldn’t find Dictionary.

You probably have more than one ConfigFile variable defined – Can you elaborate this?

@Vaishnav_Tej please try like this
New Dictionary(Of String, String) From
{“sheetID”, “efretbryygdf23r4ty54htrbgfdv”},
{“sheetName”, “testSheet”}

You have to select the two types with the two pulldowns at the top.

Even after selecting the two types I’m getting same error “Cannot find this file”

Can you explain what is that string meaning after SheetID which you mentioned ?

Are you attaching a file? That’s probably what the error is about.

Its random values…you will put here your own keys and values

Yeah I was just trying out multiple ways & attached file…!!
After deleting the attached file I’m able to solve the error.

Thanks for your immediate response.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.