Reputation: 217
I am trying to configure the UiPath get queue items activity but when I specify the QueueItemData variable as the output it gives a warning asking for a generic IEnumerable object.
What is the proper UiPath queue object to use when a IRnumerable object is required?
Upvotes: 2
Views: 3763
Reputation: 3920
You will want to use IEnumerable<UiPath.Core.QueueItem>
.
Essentially, you can read that as this is an iterable collection that contains nothing but UiPath.Core.QueueItem
objects.
Be careful when you choose the generic type associated with the IEnumerable
class though. There are many similarly named classes that can cause confusion, and if you choose the wrong one you'll end up with an error about being unable to case between one and the other.
When in doubt, allow the UiPath Studio tool to set the type for you. Just move the cursor into the input window for the field in question in the Properties tab and type set var: items
. UiPath Studio will then register the variable and set the object type to the appropriate class. This takes the guess work out of figuring out which type to use.
Upvotes: 1
Reputation: 2349
You can simply use IEnumerable<UiPath.Core.QueueItem>
as type for your variable. A simple way to create a suitable variable is to hit CTRL+K in an appropriate property field, like this:
Studio will then automatically add the variable after hitting Enter. You may need to change the scope manually.
Upvotes: 1