M1288
(Meg1288)
July 25, 2022, 10:49am
1
Hi everyone,
can anyone please help on the below scenario
I want to check the inputdatatable each row(data) is present in queue or not. But i am having more than 15000 rows in input datatable.
let me know any efficient way to achive this.
Thanks in advance.
ppr
(Peter Preuss)
July 25, 2022, 10:54am
2
clear in you requirements if a check can be done with the reference of the queue item as it is known within the input datatable.
If not, then clear in the requirements if a check on the SpecificContent Dictionary is sufficient.
In general we would use the ORC REST API and/or a LINQ for this
M1288
(Meg1288)
July 25, 2022, 11:03am
3
Hi @ppr ,
I can check by using Reference from input datatable in the queue. if there i should not add again.
Linq will be useful.
ppr
(Peter Preuss)
July 25, 2022, 11:26am
4
A main Building block could look like this
ListUpdate = ListDB.Except(ListORC).toList
ListDB = YourDataTable.AsEnumerable.Select(Function (d) d(“ReferenceColNameOrIndex”).toString.Trim).toList
ListORC we can produce by postprocessing an ORC REST API call fetching the reference info only
the new filtered UpdateTable we can achieve by
dtUpdateFiltered =
(From d in dtUpdateOrig.AsEnumerable
Where ListUpdate.Contains(d(ReferenceColNameOrIndex).toString.Trim)
Select r = d).CopyToDataTable
or With a join
(From d in dtUpdateOrig.AsEnumerable
Join x in ListUpdate
On d(ReferenceColNameOrIndex).toString.Trim Equals x
Select r =d).CopyToDataTable
M1288
(Meg1288)
July 25, 2022, 11:33am
5
Without using api, cant we check whether the item present in the queue or not?
ppr
(Peter Preuss)
July 25, 2022, 11:35am
6
have a look on the Get Queue Items Activity
UiPath.Core.Activities.GetQueueItems Enables you to retrieve a list of up to 100 transactions from an indicated Orchestrator queue, according to multiple filters, such as creation date, priority, state, and reference. Obtaining a different set is...