Retrieve Queue Items to write into Excel


I’m trying to retrieve Queue items frm Orchestrator via ‘Get Queue Items’ activity.

I set up assign’s defined the Queue: “Output_Queue.SpecificContent( “Naam”).ToString”
But the following error is thrown:


Changing the ‘Variable type’ to Uipath.Core.QueueItem will throw the same error but on the Get Queue Items.

I can’t figure out how to solve the problem. Or is there a different methode needed for my automation?

Any help is appreciated, thanks!

Get Queue Items will return 0,1 or many queue items (its similar to a collection of queue items)

Give a try on iterate over the items returned from get queue items e.g. with a for each activity

Getting All Naam Values from all returned queue items as an string array we can do:

Assign activity:
left: arrNaams | Datatype: String( )
Output_Queue.Select(Function (x) x.SpecificContent(“Naam”).toString).toArray


If you want to retrieve one by one item from Queue then use Get Transaction Item activity and it will give output as UiPath.Core.QueueItem. And then you can use SpecificContent method to retrieve required values from Queue Item.

       Output_Queue.SpecificContent( “Naam”).ToString

Thank you for the quick reponse, thanks to both of you i achieved to retrieve the items from the queue. Now i tried to use the for each activity. But the following error is displayed. How can i test it in a workflow. I understand i can use exceptions in the REF.

But for now, is it possible to use a IF, to ignore the assign if there is no data retrieved?

The IF condition is using a an incorrect reference foe an element. Check the spelling of the key and validate if that is present in the dictionary with a value.

Also, why are you using for loop?
Are you trying to fetch all items and validate inside that loop?

Thank you, you were right. I used the wrong reference. I got that sorted out!

I try to fetch all queue items. So by using a for each, i am trying to loop through the queue items to add the information to Excel.

Is there a better methode?

Also using a “IF” is not working for me. How can i let Uipath skip a specific item, if it’s empty.

Thanks again!

1 Like

Better method is to send the queue items which has data, empty queue items doesn’t make sense if they don’t need to be processed.
You can go with this for loop and “Get Transaction Item” .
you can get the Queue Items at once using “Get Queue Items” but again you will habve to use the for loop. so better stick to hat you build

Why IF is not working for you?

You can simply check if the Transaction item you fetched is empty or or not by, Transaction Item is Nothing, If the queue item doesn’t have a particulat data that acn be checked in IF too. TransactionItem.SpecificContent(“youRequiredField”) is Nothing
simply place that sequence in Try Catch and in Catch have a log messages stating the error you wish to have

I succeeded with the following:
item.SpecificContent( “Name”) Is Nothing

I had it like:
item.SpecificContent( “Naam”).ToString Is Nothing, before.
That obviously was not the right way. The items are being read, those who are empty are skipped.

Again, thank you for your help, appreciated!

1 Like

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