# Restrictions on Calculated Columns

**URL:** <https://community.glideapps.com/t/restrictions-on-calculated-columns/48090>\
**Category:** Ask for Help\
**Created:** [August 30, 2022, 1:00am UTC](https://community.glideapps.com/t/restrictions-on-calculated-columns/48090 "2022-08-30T01:00:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![escott](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/escott/32/46156_2.png) [@escott](https://community.glideapps.com/u/escott)\
**Post date:** [August 30, 2022, 1:00am UTC](https://community.glideapps.com/t/restrictions-on-calculated-columns/48090/1 "2022-08-30T01:00:33Z")

</div>

So, I get it: there are restrictions on ways you can use calculated columns. One of these is that calculated columns cannot be used to specify row owners. That’s pretty inconvenient, because in a join, the email address will pretty much always be retrieved from the user table (let’s call that **users** ), whereas the interesting data lives in the other table (let’s call that **stuff** ).

My instinct (which may not be shared by any other human) would be to then create a REF column in the **stuff** table: otherwise you just have an undifferentiated list of stuff, and you don’t know whose stuff it is! Once you have that, all you need to do is create a LOOKUP column (let’s call it **owner** ) for the email address and 🎆 🎇 you have your row owner.

But, of course, you can’t do that. So instead, I go back to the Google Sheets table and add an **owner** column with a formula like

`=ARRAY_CONSTRAIN( ARRAYFORMULA( VLOOKUP( C2:C,owners!$A$2:$D, 3, false)), COUNTA(A2:A), 1)`

That is one ugly-ass formula, but there you are.

One of the very first questions I had when I started using Glide (besides _why does my data go missing when I use Glide built-in tables_—I’ll get around to asking that one some other time) was about generating unique IDs that could be used as a join field in a REF. Smart and friendly helper @Jeff_Hager assisted me by explaining that I need to set that up as an `ARRAYFORMULA` on the spreadsheet side, in an exception to the general rule that it’s preferable to use calculated columns in Glide. Then I ran across the row owner problem, and started wondering how “exceptional” that case really is.

The division of labor here is unintuitive, and the workaround is clumsy and (I am predicting) prone to error. “Use Glide for calculated columns—unless you are actually going to need to use that column in a REF or as a row owner or (_insert as-yet undiscovered list of other restrictions here_)” may be second-nature at this point to veterans, but it definitely steepens the learning curve for the rest of us.

Am I misunderstanding the problem? If so, how? If not, is there a less awkward solution that already exists?

Thanks. \</vent\>

---

<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:** [August 30, 2022, 1:21am UTC](https://community.glideapps.com/t/restrictions-on-calculated-columns/48090/2 "2022-08-30T01:21:11Z")

</div>

> [@escott](#):
>
> But, of course, you can’t do that. So instead, I go back to the Google Sheets table and add an **owner** column with a formula like
> 
> `=ARRAY_CONSTRAIN( ARRAYFORMULA( VLOOKUP( C2:C,owners!$A$2:$D, 3, false)), COUNTA(A2:A), 1)`

For this case, I would add the email address (Owner) at the time the row is created. ie. as part of the Add Row/Add Form action. This is where “[Special Values](https://www.glideapps.com/docs/reference/values/users-email-address)” come in handy.

As to why computed columns cannot be used as row owners, that’s because computed columns are only applied _after_ data has been downloaded to a users device. And at that point, it would be too late to apply row owners.

Glide are currently beta testing a different architecture model where computations are applied server side instead of client side. If this goes ahead, it could potentially open up the possibility to have computed columns as row owners. (I don’t know if that’s part of the plan - I just know that in theory it could be possible).

---

<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:** [August 30, 2022, 1:34am UTC](https://community.glideapps.com/t/restrictions-on-calculated-columns/48090/3 "2022-08-30T01:34:28Z")

</div>

Ditto on what @Darren_Murphy said. You can just add the email of the signed in user at the time the row is created. That will allow you to use Row Owners. There should be very very few circumstances where you actually need to use formulas in a google sheet. Not saying you won’t, but in most cases you can do the same thing with glide computed columns.

---

<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:** [August 30, 2022, 1:50am UTC](https://community.glideapps.com/t/restrictions-on-calculated-columns/48090/4 "2022-08-30T01:50:05Z")

</div>

> [@Jeff\_Hager](#):
>
> There should be very very few circumstances where you actually need to use formulas in a google sheet.

@escott - just to put an exclamation mark on the above point from Jeff…  
I have a very large complex app that has a Google Spreadsheet data source. The spreadsheet contains just over 60 sheets and well over 1000 columns. In that entire spreadsheet I have a total of 4 columns that use sheet formulas. And 3 of those 4 are not required. They were added before I knew any better, and I just haven’t gotten around to getting rid of them.

---

<div class="post-metadata">

**Author:** ![escott](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/escott/32/46156_2.png) [@escott](https://community.glideapps.com/u/escott)\
**Post date:** [August 30, 2022, 5:12pm UTC](https://community.glideapps.com/t/restrictions-on-calculated-columns/48090/5 "2022-08-30T17:12:18Z")

</div>

Thanks (to @Jeff_Hager as well) for the responses. Your input helps me understand the source of the Sheets vs. Glide dichotomy more clearly as a server/client dichotomy, at least in some respects.

I’m new to Glide (but not to no-code), and so come to these concepts with fresh eyes. As feedback (which may or may not be useful for your product team), I find the Special Values thing unsatisfying. It puts behaviors that properly belong in the “controller” into the “view” instead, which feels unclean. Certainly, it creates complications; hence the need to point out [in the doc](https://www.glideapps.com/docs/reference/values/introduction-to-values#two-things-to-note-about-special-values) that

> If you haven’t enabled editing or adding items and a user changes an editable component, Glide won’t be able to populate your sheet with the date & time or the user’s email.

When it comes to fundamental security tokens like row owners, that kind of “this may not work in certain situations” language makes me nervous. 🤓

I appreciate the prompt and intelligent responses! Thanks again for your help. Now I have some new stuff to play with. 🤓

Scott

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [August 31, 2022, 5:12pm UTC](https://community.glideapps.com/t/restrictions-on-calculated-columns/48090/6 "2022-08-31T17:12:49Z")

</div>

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