# Adding unique reference to Data Table

**URL:** <https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389>\
**Category:** Studio\
**Tags:** activities-panel, question, studio, orchestrator, system, activities\
**Created:** [May 29, 2024, 2:06pm UTC](https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389 "2024-05-29T14:06:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_Learner](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/a_learner/32/181354_2.png) [@A\_Learner](https://forum.uipath.com/u/A_Learner)\
**Post date:** [May 29, 2024, 2:06pm UTC](https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389/1 "2024-05-29T14:06:11Z")

</div>

Hi,  
I have a data table that I like to upload to the queue with a unique reference. Datatable has a column “Employee ID”.

So in a for loop I am adding queue item with property Reference set to this Employee ID + DateTime.Now.ToString(“MMddyyyy”) format.

Does this work or do I need to create a refernce column in the data table itself with Employee ID value.

Please advise proper way of doing this.

Thank you,

---

<div class="post-metadata">

**Author:** ![vrdabberu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vrdabberu/32/484365_2.png) [@vrdabberu](https://forum.uipath.com/u/vrdabberu)\
**Post date:** [May 29, 2024, 2:07pm UTC](https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389/2 "2024-05-29T14:07:35Z")

</div>

Hi @A_Learner

You are using Add queue item within For Each row in DataTable right, the property set in reference will work for each row in the datatable.

Regards

---

<div class="post-metadata">

**Author:** ![postwick](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/postwick/32/227083_2.png) [@postwick](https://forum.uipath.com/u/postwick)\
**Post date:** [May 29, 2024, 2:12pm UTC](https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389/3 "2024-05-29T14:12:45Z")

</div>

It’s much better to add a Reference column to the datatable then use Bulk Add Queue Items.

---

<div class="post-metadata">

**Author:** ![A\_Learner](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/a_learner/32/181354_2.png) [@A\_Learner](https://forum.uipath.com/u/A_Learner)\
**Post date:** [May 29, 2024, 2:14pm UTC](https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389/4 "2024-05-29T14:14:42Z")

</div>

For some reason, Bulk Add is failing. I will have to go with loop.

Thank you,

---

<div class="post-metadata">

**Author:** ![postwick](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/postwick/32/227083_2.png) [@postwick](https://forum.uipath.com/u/postwick)\
**Post date:** [May 29, 2024, 2:15pm UTC](https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389/5 "2024-05-29T14:15:42Z")

</div>

How about figuring out why Bulk Add is failing? Are you getting an error message?

---

<div class="post-metadata">

**Author:** ![A\_Learner](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/a_learner/32/181354_2.png) [@A\_Learner](https://forum.uipath.com/u/A_Learner)\
**Post date:** [May 29, 2024, 2:17pm UTC](https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389/6 "2024-05-29T14:17:08Z")

</div>

Yes, really like to know why the bulk add fails. It gives me an error message.

Thanks,

---

<div class="post-metadata">

**Author:** ![postwick](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/postwick/32/227083_2.png) [@postwick](https://forum.uipath.com/u/postwick)\
**Post date:** [May 29, 2024, 2:26pm UTC](https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389/7 "2024-05-29T14:26:34Z")

</div>

What is the error message? You have to give us details or we can’t help.

---

<div class="post-metadata">

**Author:** ![A\_Learner](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/a_learner/32/181354_2.png) [@A\_Learner](https://forum.uipath.com/u/A_Learner)\
**Post date:** [May 29, 2024, 2:28pm UTC](https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389/8 "2024-05-29T14:28:41Z")

</div>

Will get back. Thank you.

---

<div class="post-metadata">

**Author:** ![A\_Learner](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/a_learner/32/181354_2.png) [@A\_Learner](https://forum.uipath.com/u/A_Learner)\
**Post date:** [May 29, 2024, 7:04pm UTC](https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389/10 "2024-05-29T19:04:38Z")

</div>

@postwick  
Bulk add worked. No issues. Thank you for the good advice about bulk add.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [June 1, 2024, 7:05pm UTC](https://forum.uipath.com/t/adding-unique-reference-to-data-table/744389/11 "2024-06-01T19:05:11Z")

</div>

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