How can i delete queue items programmatically which of status Sucessfull and older than one week

Hi,

In my project we are using multiple queues which will have large volume data items. I want to delete the queue items at the end of the day, the items which are with successful status and one week older. Please recommend how can we achieve this. The deleteqeueitem is limited to only items of new status as per documentation of uIpath.

1 Like

Hi @mryavanaki,

Check out this post:

As I understand it, it is not possible to delete items which are with successful status using a UiPath Studio activity.

However, you can use Orchestrator API to delete them,

Run SQL Query

delete from QueueItems
Where (status=5 )
–Where (status=3 or status=6 or status=5 (successful) or status=4 or status=2 )
AND TenantId = 1
AND ReviewStatus != 0
AND DateDiff(day, CreationTime, GetDate()) > 7