How does Glide detect spreadsheet columns?

It seems this topic has been discussed before but I can’t find it.
Exactly how does glide detect columns in a spreadsheet? Is it based on the column name in the first row or the column number?
What I want to ask is how to keep the glide knowing the columns constantly based on the column number even though the column names change simultaneously (because they contain formulas). In my case, it was a column name change which was a date. Is the trick of making additional rows to Glide with constant names to avoid changing column names the only way out?

I personally wouldn’t use dynamic column names or even column names derived from a formula. I think if the column headers momentarily disappear, or too many change at once, and glide is syncing at that moment, it can break things. I think database structure should remain stable for things to work properly.

Glide reads the first row. Any column that contains something on that first row will become your header in glide. I think glide will detect if a column name changes, but within reason. It probably uses a combination of an underlying column ID, the column name, and maybe surrounding columns? Just a guess.

I think it would be better to have separate columns to store dates, and then put the dates in rows.

4 Likes

Thanks for the response, Jeff.
What do you think if I use two header rows?

Can you explain this part in more detail? Is this going to use the transpose method?

Maybe if you can share a snippet of your data to better understand what you have, along with an explanation of your use case.

Also can you expand one what you mean by two header rows? I’ve done a two header row method in the past. First row to hold the header name, and second row to hold any arrayformulas. The formula row is empty, so glide ignores it. But I don’t think that’s what you mean in this case. Also I think glide may or may not do something special frozen rows in the google sheet.

What I meant by this is to have generic static column names that don’t change. So if you have Column X which stores a value for a particular date, you could add another column to store the actual date. But it would help to see your data to better understand.

Forgive me because English is not my native language.
But now I have got your point. Let’s say in the first line I use a stable dummy header and the second line where the formula is nested (like your way). Assume under certain circumstances I can hide the second row with a filter. Yes, I have got the answer to the solution.
Really appreciate your help.

1 Like

Yes you can filter it, but what I do is set up the formula bso it returns a blank value or nothing on that second row. Glide then ignores that second row with the formula because all of the columns appear empty.

I have a little problem, @Jeff_Hager. I’ve managed to redirect my headers to dummy headers, but if I duplicate the initial headers to the second row and make it frozen then Glide table will substitute the dummy headers back into those headers. Should I clear catch memory in the browser, or shouldn’t the row be frozen?

Since the reply button has disappeared in the thread, I’m using this edit section to report that I ended up using a dummy as a frozen header.
Because it contains the date as important information (not to be left blank) which one day will change simultaneously (every half a year) I put it in the second row on the condition that it is not frozen.
Experimenting with freezing two header rows is risky because Glide doesn’t necessarily take the first row as a header.
Thank you for your reply.

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

I’m not sure what’s happening, or if I completely understand how you have your table set up, but I do know this…Glide recognizes frozen rows and treats them in a special way. I think this thread best explains it:

This thread explains what I do when I put the arrayformula on a second row. I include an IF in the arrayformula so it returns a blank, but on on the second row, so glide will ignore it because the entire second row appears to be empty.

I’m not sure if this helps you in any way, but hopefully it better explains what I was trying to suggest.

1 Like