Getting error- "Assign: The given key 'Global ID' was not present in the dictionary."

While accessing data from queue and assigning to one of the variable getting the error-“Assign: The given key ‘Global ID’ was not present in the dictionary.” even though name entered for key is correct.
Can someone please help me on this.

Hi @riddhi.vanawat

The ‘Global ID’ field was not present in the variable

Can you make sure that the ‘Global ID’ is present.

Please verify from the Orchestrator transaction item the name of the key.

Key name is correct.
I have copied it from orchestrator only but still facing this error

The key isn’t correct. That’s the only way this error occurs. Make sure you don’t have extra spaces or anything in the key name in the queue item.

Also, it appears you’re looping through an array of queue items and then trying to access their SpecificContent. Why are you doing this? Usually that’s not how you handle queue items. Usually you use Get Transaction to get one queue item, process it, mark it success/fail, then Get Transaction the next queue item, etc.

hi, Why cant we use “get queue items”?

You CAN but it’s not the correct way to process queue items. The correct way is with Get Transaction because it finds the next New queue item and sets it to In Progress, and you can have more than one job running against the same queue without the same queue item being grabbed by more than one job.

1 Like