I'm getting this kind of error "Message Box: The given key 'WIID' was not present in the dictionary."

I’m getting this kind of error “Message Box: The given key ‘WIID’ was not present in the dictionary.”

My “WIID” is from the orchestrator queues. You can check the project in my github repo below:

Here is my message box:

Output Error:
image

Thank you in advance!

@C_M1

Can you show your queue item please…Looks like WIID is not added to the queue item or it is added with a different name

cheers

hi @C_M1
it seems that your queue item not contains WIID,
or there is a space or not the same name.
check it first

This is my sample queue

My config

Queue name

Make sure that’s not WLLD in your expression. Are you sure the queue item you showed us is the one the automation grabbed?

You can put into a Log Message…

String.Join(in_TransactionItem.SpecificContent.Keys,", ")

…to see the keys in the current item.

your queue name contains “” you should remove it from your dispatcher
or change in_transactionitem.specificContent(“”“WIID”“”)

1 Like

The Queue item keys contain extra quotes, You can re enter them without the quotes ( when using add transaction item, instead of “WIID” keep it as WIID) or perform the method told by @Yazan_Otaibi

1 Like

To clarify, the reason everyone is saying you have double quotes on your keys in the queue item is because this is what a normal queue item looks like:

image

On yours you can see the double quotes around each key. So you’ve added your keys as “WIID” instead of just WIID. This is being caused by incorrect code wherever the queue items are being created.

1 Like

Hi @C_M1

In the Queues the item was “WIID” like this.
You have to give the expression as

In_Config("WorkItems_URL").toString+"/"+in_TransactionItem.SpecificContent(""WIID"").toString

See the below image in my queues it was WIID only but in your queue it is like “WIID”. Then give the name of column in queue give with double quotes. “WIID”
image

The below image is the example that how did I given in my workflow

Hope it helps!!

1 Like

This would have to be…

SpecificContent(“”“WIID”“”).ToString

You have to escape the double quote. If you want the double quote as a literal in the value, you use two double quotes. Then the double quotes around the string itself makes for three double quotes in a row.

However, the proper solution is to fix why the keys have double quotes on them in the first place.

1 Like

Thank you @C_M1

If you find the solution do mark it as solution it will help for others.

Happy Automation!!

I just updated the key on my add queue item activity. Thanks!

1 Like

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