Add queue item with unique reference

Received the following comment in a code review but it is not well referred to.

Adding queue elements with reference, preferably unique.

@alexis.mendoza.rpa,

It’s a best practice to have a unique reference to a QueueItem we add to Queue. It helps in avoiding duplicate processing and to filter out queue items quickly.

You will have to create the Queue with Unique reference enabled.

While adding it using Add Queue Item pass reference like this.

Thanks,
Ashok :slight_smile:

Hi @alexis.mendoza.rpa

In Add Queue Items activity you have property called Reference where you can add the required column as reference if you working with excel. Your will have to run a For Each row for the datatable and thew required key-value pairs you want it in a transaction item.

For more information check the below docs:

For Unique References you can enable Enforce Unique References while creating a queue.

Regards

I wouldn’t consider this a best practice. It’s entirely defined by the process.

As far as being able to find things in the queue, I find it very useful. But we rarely enforce unique reference.

Anyway @alexis.mendoza.rpa the answer to your question is to fill in the Reference field of your Create Queue Item activity. If you are using Bulk Add Queue Items, then make a Reference column in your datatable and populate it before Bulk Add.

You can create unique Reference values without necessarily enforcing unique reference on the queue. If you do enforce unique reference on the queue, it’s very important to fully consider the question - what makes the item unique?

For example, we have an automation that processes the same things every day. But it should only process each thing once per day. So to avoid accidentally processing something multiple times in one day, we include the date as part of the reference and enforce unique reference on the queue.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.