# Unique ID Special Value

**URL:** https://community.glideapps.com/t/unique-id-special-value/339
**Category:** Feature Requests
**Created:** [September 17, 2019, 10:35am UTC](https://community.glideapps.com/t/unique-id-special-value/339 "2019-09-17T10:35:38Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![pspeter3](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pspeter3/32/184_2.png) [@pspeter3](https://community.glideapps.com/u/pspeter3)
#### Post date: [September 17, 2019, 10:35am UTC](https://community.glideapps.com/t/unique-id-special-value/339/1 "2019-09-17T10:35:38Z")

</div>

Create a special value which is a UUID (or other unique ID feature). This will enable less brittle associations between records. I also think this will work super well with the new data editor.

_Copied from [Spectrum](https://spectrum.chat/glideapps/general/unique-id~694240aa-8968-4067-89f9-7aee6ad30dcc)_

---

<div class="post-metadata">

### Author: ![pspeter3](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pspeter3/32/184_2.png) [@pspeter3](https://community.glideapps.com/u/pspeter3)
#### Post date: [September 17, 2019, 11:18am UTC](https://community.glideapps.com/t/unique-id-special-value/339/2 "2019-09-17T11:18:18Z")

</div>

I think a related feature request would be to allow separate values and labels like the option tag [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option).

For example you could have ID and Name columns. The value would be the ID but the label would be the name.

---

<div class="post-metadata">

### Author: ![marcovrj](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcovrj/32/597_2.png) [@marcovrj](https://community.glideapps.com/u/marcovrj)
#### Post date: [September 17, 2019, 12:21pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/3 "2019-09-17T12:21:15Z")

</div>

Yes! I’m really interested in this feature. So, the users will be able to change the names without worry. The issue is: what formula or function of Google Sheet will create automatically this ID? Because it’s not user friendly ask to end users to create a random ID each row.

---

<div class="post-metadata">

### Author: ![pspeter3](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pspeter3/32/184_2.png) [@pspeter3](https://community.glideapps.com/u/pspeter3)
#### Post date: [September 17, 2019, 12:34pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/4 "2019-09-17T12:34:09Z")

</div>

The proposal, if I’m reading Spectrum correctly, is for Glide to generate the UUID on create. You would add this to your form just like you would add creator and creation time

---

<div class="post-metadata">

### Author: ![marcovrj](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcovrj/32/597_2.png) [@marcovrj](https://community.glideapps.com/u/marcovrj)
#### Post date: [September 17, 2019, 1:14pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/5 "2019-09-17T13:14:47Z")

</div>

It’s a nice ideia. Not only in forms by button, but in every add function. I agree!

---

<div class="post-metadata">

### Author: ![pspeter3](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pspeter3/32/184_2.png) [@pspeter3](https://community.glideapps.com/u/pspeter3)
#### Post date: [September 24, 2019, 2:48pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/6 "2019-09-24T14:48:02Z")

</div>

I still keep thinking about how many issues this would solve for relations. I’m really excited if this becomes the approach.

---

<div class="post-metadata">

### Author: ![George\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/george_b/32/534_2.png) [@George\_B](https://community.glideapps.com/u/George_B)
#### Post date: [September 24, 2019, 7:00pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/7 "2019-09-24T19:00:36Z")

</div>

Here is a workaround using a script. You would need to create a timed trigger to run the function every minute or so. This would cause a delay in the data being populated in your app but it works for me because the linked sheet items, the ones using that unique ID, don’t get added that fast after the parent row is added. The script in attached to [this spreadsheet](https://docs.google.com/spreadsheets/d/1OI1GBnX7txhjfqRGbrz4lurIO7Cm1SXPxaPOADv0ezI/edit?usp=sharing). Make copy of it and experiment with it.  
Here is the script in case the spreadsheet disappears in the future. I put in a lot of comments so hopefully most of you familiar with scripts can follow along. Add a new row to the sheet without the ID and Image columns to see what happens.

````auto
/* 
  Run this function in a timed trigger
  The test sheet ("Order" in this example) should have the first column be the ID
  Columns B through .... has the data that the App added
  Another sheet is needed (appdata in the example) to hold a number that represents the next ID
   - For this example it is in cell B2 
*/

function check4NewOrder(){
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName("Order");
  var lastRow = sheet.getLastRow();
  var sheetAppdata = ss.getSheetByName("appdata");
  // assumes the ID is going to be in column A
  var data = sheet.getRange(2,1,lastRow-1,1).getValues();
  var countDown = 3; // number of rows to check from the bottom for blank ID's
  
  // walk the data rows from the bottom as the most recent add will be there
  for (var i = data.length-1; i > -1; i--){ 
    if (data[i][0] === ""){
      // if you want to set some default values in columns past 1
      // then bring more rows into the array and set them as you wish
      // this demo is bringing in 6 columns of data for this row
      var rangeRow = sheet.getRange(i+2,1,1,6); 
      var dataRow = rangeRow.getValues();
      // create the new ID
      var sheetAppdata = ss.getSheetByName("appdata");
      var rangeAppdata = sheetAppdata.getRange("B2");
      var dataAppdata = rangeAppdata.getValue();
      // you can tack on some letters in the front to make it easier to spot and know 
      // where it's linked to
      var newID = "ORD" + dataAppdata.toString();
      // increment for the next ID
      rangeAppdata.setValue(dataAppdata+1);
      // put the ID in the data array
      // if you bring in more than the first column into the array you could
      // set some other default values if you wanted to here as well
      dataRow[0][5] = "<image URL here>";
      dataRow[0][0] = newID;
      rangeRow.setValues(dataRow);
    };
    countDown--;
    if (countDown < 0) {break}
  }
}```
````

---

<div class="post-metadata">

### Author: ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)
#### Post date: [September 25, 2019, 2:58am UTC](https://community.glideapps.com/t/unique-id-special-value/339/8 "2019-09-25T02:58:26Z")

</div>

Yes, Glide would create the Unique ID as a special value, just as Current Time works today.

---

<div class="post-metadata">

### Author: ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)
#### Post date: [September 25, 2019, 6:31am UTC](https://community.glideapps.com/t/unique-id-special-value/339/9 "2019-09-25T06:31:11Z")

</div>

Is that option around the corner, David? Or is it low on the buildlist?

---

<div class="post-metadata">

### Author: ![Jason](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jason/32/14_2.png) [@Jason](https://community.glideapps.com/u/Jason)
#### Post date: [September 25, 2019, 7:03am UTC](https://community.glideapps.com/t/unique-id-special-value/339/10 "2019-09-25T07:03:24Z")

</div>

We are entering a new major product cycle. At the moment the “buildlist” is being determined based on feedback. 🙂 I think a UUID solution is likely to be on the short list, but its not being actively worked on yet.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [September 25, 2019, 12:11pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/11 "2019-09-25T12:11:44Z")

</div>

I’ll just throw in my two cents argument for UUID. I have a sheet of students. When a new name is entered, I have a script the takes over and populates 3 other sheets with their name. Their name is the key value which links the sheets together. The problem I have is that if a name is ever changed, or it was misspelled and corrected, then a new entry is created in those other tables and and the link to any previously entered data is broken. For me, UUID would allow one ID and it frees me up to changes the students name without breaking any links to data in other sheets.

---

<div class="post-metadata">

### Author: ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)
#### Post date: [September 25, 2019, 12:26pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/12 "2019-09-25T12:26:50Z")

</div>

I am building a platform where people can ask others to do small jobs for them. They can have the same description though (buy a book, clean car, etc). There it would help to have UUID’s.

---

<div class="post-metadata">

### Author: ![pspeter3](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pspeter3/32/184_2.png) [@pspeter3](https://community.glideapps.com/u/pspeter3)
#### Post date: [October 16, 2019, 9:09pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/13 "2019-10-16T21:09:24Z")

</div>

This would still be a great feature! Any word on if it will come out in a glide release soon?

---

<div class="post-metadata">

### Author: ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)
#### Post date: [October 18, 2019, 6:35pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/14 "2019-10-18T18:35:06Z")

</div>

I understand the Gliders can’t promise on timelines, but to me it would help to know if a feature is No2 out of 10 or 10 out of 10 on the roadmap, Now it feels like we have to campaign for features 😉

> We are entering a new major product cycle. At the moment the “buildlist” is being determined based on feedback. 🙂 I think a UUID solution is likely to be on the short list, but its not being actively worked on yet.

---

<div class="post-metadata">

### Author: ![pspeter3](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pspeter3/32/184_2.png) [@pspeter3](https://community.glideapps.com/u/pspeter3)
#### Post date: [October 18, 2019, 7:32pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/15 "2019-10-18T19:32:24Z")

</div>

Yeah, it’s hard to tell if we should wait for a feature or not.

---

<div class="post-metadata">

### Author: ![JackVaughan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jackvaughan/32/49023_2.png) [@JackVaughan](https://community.glideapps.com/u/JackVaughan)
#### Post date: [November 15, 2019, 12:07pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/16 "2019-11-15T12:07:18Z")

</div>

This is now live! 🙂

 ![07](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/5/5c9a19bc96b325e4b420bc0e6a230ea2e4c5d700.png)

---

<div class="post-metadata">

### Author: ![Sidney\_Kunst](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sidney_kunst/32/603_2.png) [@Sidney\_Kunst](https://community.glideapps.com/u/Sidney_Kunst)
#### Post date: [November 15, 2019, 12:42pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/17 "2019-11-15T12:42:27Z")

</div>

This feature is awesom but it needs to be a little extended. To be specific, the choice component need an update. EXAMPLE:  
A matchup item/row between 2 teams has an Unique ID.  
I want to add a News item about this game.  
I setup all the component and a choice field with the games ID’s to choose from so they can awesomly be related! Unfortunately you will see the ID in stead of a human readable titel.

So, Can a choice component SHOW column A (name) but add Column B (ID) tot the cell.

_I have a workaround already working at this moment, but I don’t really like this setup. In screen of the game/mathup you can click a form to “add news item” in there is a column value that adds the id_

---

<div class="post-metadata">

### Author: ![George\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/george_b/32/534_2.png) [@George\_B](https://community.glideapps.com/u/George_B)
#### Post date: [November 15, 2019, 2:46pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/18 "2019-11-15T14:46:04Z")

</div>

I have asked for this feature already. Maybe chime in on that post to help it not get lost in this thread.

> [@Choice Component - allow key display pairs](https://community.glideapps.com/t/choice-component-allow-key-display-pairs/581):
>
> In the interest of some kind of data normalization and using key links in your tables/sheets it would be nice to display pretty text for the choice dropdown but save a key value to the database/sheet. This is more in line with how it is implemented in HTML which is what is ultimately driving things under the covers. This is the idea I’m talking about. The user would see the long text but the save would be the shorter. All that you would have to do is allow the user to optionally select a sec…

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [November 15, 2019, 3:00pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/19 "2019-11-15T15:00:32Z")

</div>

I wrote a reply in @George_B thread that he posted above.

---

<div class="post-metadata">

### Author: ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)
#### Post date: [November 15, 2019, 3:07pm UTC](https://community.glideapps.com/t/unique-id-special-value/339/20 "2019-11-15T15:07:21Z")

</div>

> [@erwblo](#):
>
> I understand the Gliders can’t promise on timelines, but to me it would help to know if a feature is No2 out of 10 or 10 out of 10 on the roadmap, Now it feels like we have to campaign for features 😉

We’ve previously semi-promised timelines for features, but then priorities shifted for one reason or another, so we’re much more careful now. Unless something is very high priority or right around the corner we generally don’t give timelines anymore.

As for campaigning: it certainly helps us to know which features the community wants most, and what the use cases are 😉

[Next page](https://community.glideapps.com/t/unique-id-special-value/339.md?page=2)
