The scenario is like this:-
I running the bot. while running bot is add the queue item in orchestrator.
while adding queues i have given the date in the reference.
but while “get queue items”, it is getting the previous queues also. i want to get the latest queues which is “status=New”
FYI i don’t want to delete old(Status=New) queue item.
For example, File Name format: XYZ.xlsx 07/28/2023 23:17:00
How to achieve this.
- If there is pnly one item with status new…then in get queue items selecting status new will get you the only nee item present
- If the above is not the case then you will get all the items and you can sort by date if the reference is containing datetime and get the latest date item…please use below formula
Let the output of get queue items is saved in quls variable
requireditem -= Quls.OrderByDescending(function(x) CDate(x.Reference))(0)
This wil get the queue item with latest datetime reference
Assumption is queue reference contains unique date times
Hope this helps