Assign: The given key was not present in the dictionary

Hi I am trying to automate a web page form filling by using ques but i am getting error
Assign: The given key was not present in the dictionary.

Your workflow is attempting to access a key in your dictionary which has not been inserted into the dictionary. The way to where this is happening is to use Step Into to walk through the workflow and find out when the error occurs. When it does, find the reference to your dictionary which may be causing the issue and troubleshoot what you have in the dictionary.

Unfortunately, these errors are a bit tricky to track down, since the error does not output what key failed specifically.

1 Like

Two things I would suggest @Imran_Khan1

Name your assign activities with a unique name - Like ‘Assign First Name’, ‘Assign Last Name’, etc. this makes it easier for you to debug when it fails.

Second, check all the specific content that you are trying to access from the queue item. This should be exactly how it shows up in the transaction item in the queue. My hunch is one of them could have been spelled wrong, have an extra space, case mismatches, etc.

only the issue is with the Assign Last Name other values are able to be fetched from the queue

i checked for spelling or space mistake

If this is related to the challenge, the Last Name field in the Excel document has a space after it. Depending on how you would like to solve for this, you can either correct the file itself, or create a solution to code around it.

Therefore, without changes, the column name is actually "Last Name ".


thanks @Anthony_Humphries it worked. was banging my head for long

Now see that’s the challenge :smiley:

1 Like

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