Hi there, i already have a uniqe ID column on my googlesheet, can i make that column as my đź”’ Row ID in glide

Im trying to avoid adding a :lock: Row ID row that is built in. my google sheet is being queried from another google sheet, meaning that I can’t edit mess with the cells. and adding a row id from glide would mess it up. is there a way that i can assign my own column in google sheet to be a :lock: Row ID<
thanks

The native “:lock: Row ID” column in a Glide table has its own inner workings and I personally avoid messing with it. I don’t even rename the column anymore. I use it on just about every table, but I don’t play around with it.

If you have your own ID column in Google Sheets, you could continue using it of course to uniquely identify rows, but:

  • I don’t think you can associate your column to Glide’s native “:lock: Row ID”
  • and your column will probably lack features that the native one offers under the hood.
1 Like

Most notably, User Specific Columns will not be available in any Google Sheet connected table that doesn’t have a Glide generated RowID.

when I edit the column in glide, it doesn’t give me the option to make it a :lock: Row ID, i must create one from glide page. But this will mess up my google sheet. I will have to find another way then. Thank you

1 Like

Why will it mess up your Google Sheet?
It will just add a column to the end of the sheet. That shouldn’t present a problem? :thinking:

1 Like

Yeah I think about this the same way. If you structure your query the right way then it will just output the right number of columns. Adding a rowID to the end of it should not be a problem.

So here is the scenario.
There are two workbooks. One is called “original inventory” and the other is called “copy of inventory”
Now, generally, i don’t like to mess with the original inventory because it has a lot of formulas and a lot of columns too. and the way i add stuff to it is automatic from my phone. So to link my google sheet to glide, I had to make another workbook by the name of “copy of inventory” and query the data (query only the columns i want glide to see) from the workbook “original inventory”. This means whatever i do to the original inventory will also be done to copy of inventory DYNAMICALLY!.
meaning that if i remove row 50 from the first workbook, it will automatically remove that row on the second workbook. But everything will move up, row 50 wont be blank on the second workbook(that’s because my query function is filtering the data based on some criteria)
Now, glide is linked to my “copy of inventory” workbook because it has the columns that i specified in the query function and its also filtered by some criteria. so far so good. When i add the “:lock: Row ID” coulmn from glide, it will add a column on my “copy of inventory” workbook, it will place it far to the right. BUT THAT COULMN IS STATIC! meaning that if i remove row 50 from “orignial inventory”, the query function will only be responsible for removing the row that was on “orignial inventory”. And everything will shift up, HOWEVER the column “Row ID” that glide added is static and row 50 wont be affected just for that coulmn(row ID)
I dont know if i explained it well, but its something that has to do with google and not glide. ill have to work on another solution. But i was just thinking why would glide let us choose our own “row ID” from the data we give to it.

Okay, I understand.

So I assume that Glide only reads from that workbook and doesn’t write any data back to it, yes? If it was writing data back to the sheet, then that would break your import/query formulas.

I guess the first question is - do you actually need a RowID column in that sheet? If you don’t need any User Specific Columns in Glide for that sheet, then there is probably no need for a RowID at all. Especially if you already have your own ID that can be used for relations, etc.

But assuming you do, then the best solution would be to dispense with your copy and just attach Glide to the original workbook. But I guess you don’t want to do that.

I think what I would do in this case is write some Apps Script to keep the two workbooks in sync. It will be a bit more work to setup, but will be a more robust solution in the long term. And you’ll be able to set it up so that a whole row is deleted in the copy when it’s deleted in the master. So you won’t have the issue you have now with the Glide RowIDs.

Just a word of advice when using query formulas or importrange to move data into a worksheet that’s connected to Glide. When you do this, best practice is to use static column headers and start your import from row 2. The reason for this is that if your formulas ever break and all the imported data disappears - including the column headers - then any components and screens that are built on top of that sheet in Glide could potentially break. But if the column headings are static, this will never happen.

2 Likes

thanks for your genuine feedback,
I am working on a script right now for it to work. Like I said, its more of a google problem than glide. I do appreciate the suggestion, I have thought about them before, but they might not work with the plan I created.
Thanks again

Cool.
I’ve done this before (written Apps Script to keep sheets in sync), so if you need any help with that feel free to ask.

1 Like

Thank you! i will keep you in mind if i get stuck

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