# Unique Identifier the same in the whole action flow

**URL:** <https://community.glideapps.com/t/unique-identifier-the-same-in-the-whole-action-flow/34543>\
**Category:** Ask for Help\
**Created:** [November 15, 2021, 6:25pm UTC](https://community.glideapps.com/t/unique-identifier-the-same-in-the-whole-action-flow/34543 "2021-11-15T18:25:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lin\_Altshuler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lin_altshuler/32/32591_2.png) [@Lin\_Altshuler](https://community.glideapps.com/u/Lin_Altshuler)\
**Post date:** [November 15, 2021, 6:25pm UTC](https://community.glideapps.com/t/unique-identifier-the-same-in-the-whole-action-flow/34543/1 "2021-11-15T18:25:50Z")

</div>

Is the Unique Identifier unique per insert or per the whole action flow?  
Do I need to hold it in a column and reset it after every use? or is there a more elegant way to connect 2 rows?  
I am writing data to 2 tables and I need a 1-1 relation between them.

---

<div class="post-metadata">

**Author:** ![BlakeWS](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blakews/32/24377_2.png) [@BlakeWS](https://community.glideapps.com/u/BlakeWS)\
**Post date:** [November 15, 2021, 7:28pm UTC](https://community.glideapps.com/t/unique-identifier-the-same-in-the-whole-action-flow/34543/2 "2021-11-15T19:28:38Z")

</div>

What I’ve seen is that when you are trying to set a unique ID in two tables from the same action flow that two different IDs are set. My example is for a schedule where one table is a custom calendar, and the other is for the calendar entries.

What I did to fix it is set the unique ID in the user-specific column in the custom calendar when the user presses a button to create a calendar entry, and then create a row with the unique ID in the calendar entry table when the user presses a button to save the entry. Then I can make the relation between the two. I don’t use the user table for this, although the ID is tied to the user making the entry.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 15, 2021, 11:34pm UTC](https://community.glideapps.com/t/unique-identifier-the-same-in-the-whole-action-flow/34543/3 "2021-11-15T23:34:13Z")

</div>

I have somewhat the same approach. On the open of a form I set a unique value to my user profiles table, then write that to the related tables when users submit the form/use an add row action.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [November 16, 2021, 1:32am UTC](https://community.glideapps.com/t/unique-identifier-the-same-in-the-whole-action-flow/34543/4 "2021-11-16T01:32:35Z")

</div>

yah, same here. I think this must be a common approach 😉

---

<div class="post-metadata">

**Author:** ![BlakeWS](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blakews/32/24377_2.png) [@BlakeWS](https://community.glideapps.com/u/BlakeWS)\
**Post date:** [November 16, 2021, 3:04am UTC](https://community.glideapps.com/t/unique-identifier-the-same-in-the-whole-action-flow/34543/5 "2021-11-16T03:04:09Z")

</div>

In my example I’m not setting any value in my user table because I expect to have hundreds of these IDs per user. My schedule IDs are tied to their user ID, but I’m writing the joins in a separate table.

---

<div class="post-metadata">

**Author:** ![Lin\_Altshuler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lin_altshuler/32/32591_2.png) [@Lin\_Altshuler](https://community.glideapps.com/u/Lin_Altshuler)\
**Post date:** [November 16, 2021, 5:53am UTC](https://community.glideapps.com/t/unique-identifier-the-same-in-the-whole-action-flow/34543/6 "2021-11-16T05:53:36Z")

</div>

Yep,  
That’s what I thought, just wanted too see if maybe anyone has different idea.  
I will hold it in the data and reset it.  
Would have been nice to select a unique identifier per compound action.  
Thank you!
