Assign: The given key was not present in the dictionary in

Respected Sir/Ma’am,

I am getting this error
Assign: The given key was not present in the dictionary.
can use please slow it

1 Like

what are the key you trying to use from dictionary its not existing please debug and check you giving correct name check case also

I assume you want to extract full paths of a directory with variable file_list.
When you call Directory.GetFiles(), check variable if it is set.

What type of variable is your file_list? String?

Hey @badal_patel

I guess you are passing a dictionary value inside Directory.GetFiles()

So if the key is not present then the error comes

Thanks
#nK

Hello @badal_patel

Can you share the expression which you have added in the assign activity?

Also if you have added some folder path in the ,Directory.GetFiles(FolderPath)

You need to verify FolderPath is a holding some values. So you need to check the key values pair you declared in the config file and the values which is coming in this expression.

ReFramework_PdfAutomation.zip (2.4 MB)

please check the flow & let me know

Are you Taking Value from RE Framework Config File?
If yes than please check the Name You have Passed is present in Config File Name Column.

Regards,
Saloni

still getting same error,
can you please check the flow & relsove issue

Try it by Copy Name from Config and than Replace it to the Assign Config Name.

I am not getting That error.

Regards,
Saloni

Which name?

“FileFolder_Path” Name From Config File.

@badal_patel
if replacing the assign value doesnt work, can you try update system.activities and excel activities to latest version (not preview)

I checked your config file, check the folder you are using for variable “FileFolder_Path”,
did you write the folder name correctly? (check for blank spaces)
Does the folder exist?

still getting same error please send your working flow

try
ReFramework_PdfAutomation.zip (2.4 MB)

It is actually pretty easy:
Change your variable “FileFolder_Path” in Config to following:

Data\Input\To ProssesThe InvoceFiles

See test workflow below:

Also, please use absolute path for folder:

  1. Shift + Left Click on folder
  2. Click on “Save as Path”
  3. Paste in Config variable (remove quotation marks)

still getting same error… please send your flow

ReFramework_PdfAutomation.zip (2.4 MB)

Check Test.xaml