Vrishchik
(Naveenkumar Shivaraju)
April 21, 2023, 6:48am
1
HI All,
I need to check the queue item count with the condition as below:
I need to check whether the queues contains the word “NY” is greater than zero.
in simple in_transactionitem.contains(“Cloumnname”).contaiins(“NY”) is greater than zero or not.
how to achieve this??
@Yoichi
@ppr
@vishal.kp
@gok
@ushu
ushu
(Usha kiranmai)
April 21, 2023, 6:53am
2
Hi @Vrishchik - Can you try this
Take if condition to check, queue date contains NY
If condition - QueueData.SpecificContent("Test").ToString.Contains("NY")
Then >> QueueData.SpecificContent("Test").ToString.Count
Else >> Required steps/Nothing
Hi @Vrishchik
How about the following?
If your queue item is type QueueItem then try with
in_TransactionItem.SpecificContent("yourKey").ToString().Trim().ToUpper().Contains("NY")
If your QueueItem is type DataRow then try with
in_TransactionItem("YourColumnName").ToString().Trim().ToUpper().Contains("NY")
Regards
Vrishchik
(Naveenkumar Shivaraju)
April 21, 2023, 6:56am
4
will equation gives the count only for NY??
Because that column there are multiple states like NY(Newyork), TX(Texas) etc
Vrishchik
(Naveenkumar Shivaraju)
April 21, 2023, 6:56am
5
I need to take the count for each individual state
ushu
(Usha kiranmai)
April 21, 2023, 7:04am
6
@Vrishchik - I am assuming it’s a queue date looking at in_transactionitem
To understand the above one, can you share the screenshot of your input format
ushu
(Usha kiranmai)
April 21, 2023, 7:11am
8
@Vrishchik - Sound like for Guarantor State field it could be NY (NewYork) or TX (Texas) or some other
To check Guarantor State field contains NY or no, you can use if condition
If condition - in_TransactionItem.SpecificContent("Guarantor State").ToString.Contains("NY")
Then >> Assign activity, Variable of type Integer DataCount = in_TransactionItem.SpecificContent("Guarantor State").ToString.Trim.Count
Else >> Required steps/Nothing
Anil_G
(Anil Gorthi)
April 21, 2023, 7:55am
9
@Vrishchik
If I am not wrong you want to check number of queue items containing NY is greater than zero or not…if yes try the below
Use get queue items to get a set of queue items and say output is quls
then quls.Where(function(x) x.SpecificContent("Guarantor State").ToString.Contains("NY")).Count>0
Hope this helps
cheers
ppr
(Peter)
April 21, 2023, 7:57am
10
sounds like you are interested on a report of multiple QueueItems within a particular period.
Retrieval:
Orchestrator API
Get Queue Items ← s
Calculation:
one of many options: LINQ and Grouping the data (Group by)
Vrishchik
(Naveenkumar Shivaraju)
April 21, 2023, 7:59am
11
Imagine there are 20queue items contains
10 queue items contains “NY” then the total count is 10 which contains NY.
and reamining 10 queue items contains “DE” then the count of DE is 10.
I am expecting output count for NY is 10
Anil_G
(Anil Gorthi)
April 21, 2023, 8:01am
12
@Vrishchik
That is what exactly the above query output would be…It gives you 10…first use get queue items to get all the queue items into a variable
cheers
Vrishchik
(Naveenkumar Shivaraju)
April 21, 2023, 1:48pm
13
Getting error specific content is not a member of UiPath.core.Queueitem
Vrishchik
(Naveenkumar Shivaraju)
April 21, 2023, 1:49pm
14
may I know what is the quls ??
whether it is the output of get queue item??
Anil_G
(Anil Gorthi)
April 21, 2023, 2:23pm
15
@Vrishchik
Yes thats the output of get queue items…
and I have typed wrong its specificContent …there was an extra e can you please correct it.I Updated the formula above
cheers
Vrishchik
(Naveenkumar Shivaraju)
April 21, 2023, 2:49pm
17
Thank you it is working fine as expected.
1 Like
system
(system)
Closed
April 24, 2023, 2:50pm
18
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.