Kunal_Jain
(Kunal Jain)
December 20, 2022, 8:41am
1
I have a List queue that I have got from Get Queue Items.
I just need to find the Progress = Success from that List to check if the process is success for further execution of the code.
Here I have attached the text that I got from List
List(1) { QueueItem { AssignedTo=null, DeferDate=null, DueDate=null, Id=383550652, ItemKey=[bf0ebe23-9b20-4990-ba37-0f6d0900466b], LastProcessingOn=“12/20/2022 08:32:04”, Output=null, Priority=Normal, ProcessingException=null, Progress=“Success” , QueueDefinitionId=383550652, QueueName=“Demo”, Reference=null, RetryNo=0, ReviewStatus=“None”, RowVersion=byte[8] { 0, 0, 0, 0, 66, 84, 105, 137 }, SpecificContent=Dictionary<string, object>(1) { { “Result”, “Success” } }, StartTransactionTime=[12/20/2022 08:32:04], Status=InProgress } }
The value in Bold need to be checked.
How can we check that?
Anil_G
(Anil Gorthi)
December 20, 2022, 8:45am
2
@Kunal_Jain
Use a for loop with inargument as list of queue items(variable that you already have) then type argument to queue item
Inside the loop use currentitem.progress
Cheers
ppr
(Peter)
December 20, 2022, 9:04am
3
As a List can have 0,1 or more items the requirement maybe needs some more detail definitions. However here a few samples:
Similar to above, check first element:
YourListVar.First().Progress.Equals(“Success”)
Checking if Any items is contained, having Progress=Success
YourListVar.Any(Function (x) x.Progress.Equals(“Success”))
Checking if Allitems are having Progress=Success
YourListVar.All(Function (x) x.Progress.Equals(“Success”))
Filtering for the Progress = Success items
YourListVar.Where(Function (x) x.Progress.Equals(“Success”)).toList