Duplicate Queue items

Suppose a dispatcher process runs at 7am in the morning and add few queue items. The same dispatcher also runs every two hours. Now how can we avoid the same addition of similar data on the same day but add that data again at 7am the next day. How can we achieve this?

Use add reference with the unique value.and while defining queue in orchestrator set reference as unique

Hi @Akshay_Mishra

You can try out these steps:

  1. In Assign activity use as below

v_TimeString = DateTime.Now.Tostring(“dd/MM/yyyy”) +" 07:00:00"

  1. Use Get Queue Items activity and in properties under Options-> From field you can use this as filter - DateTime.ParseExact(v_TimeString,“dd/MM/yyyy hh:mm:ss”,System.Globalization.CultureInfo.InvariantCulture)
    This will return the queue items which were added after today at 7AM.

  2. Before adding your queue item check whether your queue item is available in the output received in the 2nd steps as below

v_QueueItems.Where(Function(q) q.Reference = “12345”).Count

  • If this returns count more than 0 then the queue item 12345 is already added after 7Am today and you can skip that
  • If this returns 0 that means this queue item is not added yet to the queue and can be added.

→ Note: For this while creating queue do not select “Unique reference” as yes.

Hope this helps

Regards,
Rajeswari