While Add queue Item in queue how to avoid duplicate data in queue

Hi ,

i want to avoid duplicate data in queue while adding data in queue .Really Apricated if any Example and workflow shared how to handle.

Hey,
You can use ‘reference’ in the ‘add queue item’ activity and in the queue settings mark unique reference as true.
image
image

1 Like

Ach. When you do this and reference number will be exists in the queue you will get an exception. So please remember handle this activity for example using ‘try catch’.

2 Likes

Thanks Pikorpa For quick reply. can you please let me know one more thing what should use in reference section in property section.

Hi @PRABHJOT_SINGH

Welcome back to UiPath Forum,

Please look at this.

You can use Unique reference option for this to avoid duplicating the same queue item

image

Thank you.

1 Like

Unique reference should be some unique identifier.

Example:

PolicyNumber, ClaimNumber etc.

Thank you

1 Like

The reference number should be unique value like: ‘order number’, ‘guid’ etc.
To set ‘unique reference’ in Orchestrator you have to create new queue. If I remember correctly you can’t add this properties when editing.

3 Likes

Thanks @Jobin_Joy . Its Like a Unique Key!! Right. Is there any way to edit Unique Reference from No to Yes in existing Queue or i need to create new Queue. Because System does not let me allow to change this.

@PRABHJOT_SINGH unfortunately you have to create new one.

3 Likes

As @pikorpa mentioed we can’t change it once created. Thank you

1 Like

Thanks @pikorpa @Jobin_Joy , Can you please look once on mentioned screenshot while first run its added the data and when add more data in excel and run the Workflow its showing unique Reference error .how to solve this issue if i want to add those data which not added before and avoid duplicate those which is already added. For Example if we getting data every hr and appending frequently.
SCREENSHOTS11

As I mentioned before, you cannot add the same ‘unique reference’ twice.
You have to handle this, for example by adding ‘try catch’.
image

3 Likes

If you want add item(s) which are not added before means, simply set the unique reference error exception as nothing instead of throwing errorthat so the BOT will add the missed items to the queue.
Basically, error will be there but you are not taking any action since it is excepted one in your case.

Thank you.

2 Likes

Thanks @Jobin_Joy @pikorpa .Its Working

1 Like

you’re welcome :slight_smile:

2 Likes

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