Getting specific queue data and creating variables

Hi. Currently, I am using the “Get Queue Items” and outputting the data into the varible "QueueData
. How can I extract the QueueData into variables? Also, for some reason, the robot keeps running after few minutes. Is that because I have not deleted the queue that triggered? I appreciate for any help on this.

HI @ymstudio1

For example if your QueueData Has somedata like Name, Class, Marks

you can create 3 variables in your flow.
sName=QueueData.SpecificContent(“Name”).toString
sClass=QueueData.SpecificContent(“Class”).toString
sMarks=QueueData.SpecificContent(“Marks”).toString

That would be all that you need to do.

The SpecificContent is the function that you would need in order to fetch data from queueItems.

Thanks
Happy Automation!
:slight_smile:

@adiijaiin Thank you so much for your help.
When I assign the variable with QueueData.SpecificContent(“Name”).toString, I am getting a following error:

hi @ymstudio1 ,

It looks like you have used Get Queue Items, and its output is IEnumerable . My bad that I didn’t notice it earlier in post.

So you need to put a loop on QueueData first using For Each loop.

Inside the loop you’ll be able to use the above mentioned functions:

Hi @ymstudio1

Can you try this-

stritem=QueueData(“ItemName”).ToString

Thanks!!

There is no point to creating variables and moving the data into the variables. You can reference the data directly from your QueueItem variable. Creating variables for it is redundant and unnecessary.

Also, why are you using Get Queue Items instead of using Get Transaction, processing the item, then getting the next one (all in a loop)?

Thank you @adiijaiin . I used the For Each action and now it works!! I appreciate for your help!!

1 Like

Hi @ymstudio1

Can you mark the correct post as Solution!
That might help someone if they have some kind of similar doubt.

Thanks
Happy Automation! :smiley:

1 Like

Done! Thank you so much for your help!

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