How to add unique values in queue by add queue items

While try to add unique values caught exception “Message: Error creating Transaction. Duplicate Reference. Error code: 1016”. since enabled the unique reference in orch while creating queues. Once we get the exception. It just stop to add the further unique items. How to check the value is unique and need to adding the values further on queue. Is there any condition avail to check the values reference.

Excel values which tried to add in queue
Id Types
111 Gift Cards
222 Pet Supplies
111 Buy Again
567 Gift Cards

Hi @Sparkle_s ,

There are two ways to do this-

1- disable unique feature and handle it in your excel tracker separately.

2 - Use Get Queue Item activity that will give you a collection of queue items so before adding any new item to queue just check in the collection first, if it’s present escape it.

1 Like

Hi @Sparkle_s
If you are doing a bulk insert, you might wan to select “Process all independently”
image

If you are inserting one by one, you might want to do what @ermanoj3101 has said, first use the get queue item before trying to insert.

2 Likes


Thanks for the fastest response @GersonTun & @ermanoj3101 .

As per @GersonTun ,

  • tried the bulk insert with commit type. but caught exception as “,Error creating Transaction. Reference is required for Unique Reference Queues.”
  • so added Reference by update row item on data table and achieved the partial solution.
  • since created the unique column(Reference) it just consider it as new values so unable to compare with old one and duplicate values created on queue.
  • Please correct me if i am wrong on usecase.

As per @ermanoj3101,
case1: disabled an unique reference and handled by excel activity.
case2: On get queue item activity. while get the queue items on queue it make the status new to inprogress. hence unable to perform queue items on future robot use.

kindly help me guys to achieve the solution.

Hi , get queue items won’t change the progress

Hi,

Yes get queue item wont change status, but to get specific value(“Id”) in the queue used get transaction item so it makes queue inprogress.
Not sure on how to check\ compare the queueitem values and excel column value(read range).
image

image
Please share any idea on this.

Hi,

Case 1: using addqueueitem activity, added the unique values to the queue.
At the duplication value, the activity will throw error as duplicate and stop the execution, hence used the continue on catch block. it just eliminate the duplicate(comparing queue and excel) and continue by adding the unique values in to the queue.

image

Case 2: On bulkadditem activity thrown error if reference is not added and property window we dont have option, hence made the Id column as reference. and commit type is ProcessAllIndependently.

Thanks @ermanoj3101 , @GersonTun , @NIVED_NAMBIAR for share the information.
Got my answer and it is worked.

2 Likes

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