How to delete queue item upon given condition?

Hello Team,

I just wanna delete 2 items from my queue items. How to do this ?

There is aan activity as “Delete queue items” but it only takes whole queue items, but i only wanna delete/remove item that i want (on given condition).

@RobotUi,

To delete specific items from a queue based on given conditions (other than just the ‘New’ status) within UiPath, follow these steps:

  1. Retrieve Queue Items:
    Use the Get Queue Items activity to retrieve the items from the queue. You can specify filters to get the specific items you want to delete.
  2. Filter out desired queue items to delete:
    Use Assign activity to filter out desired queue items using LINQ. For example here I’m filtering out queue items with Specific Content with Key Name is having value Ashok
queueItemsToDelete = queueItems.Where(Function(q) q.SpecificContent.ContainsKey("Name") AndAlso q.SpecificContent("Name").ToString() = "Ashok").ToList()

Make sure Datatype of queueItemsToDelete is List(Of QueueItem)
3. Delete Queue Items:
Use Delete queue items to delete the queueItemsToDelete

1 Like

@RobotUi

Check it