# Can you "Lock" columns?

**URL:** https://community.glideapps.com/t/can-you-lock-columns/9387
**Category:** Ask for Help
**Created:** [May 18, 2020, 7:45pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387 "2020-05-18T19:45:48Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Izzy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izzy/32/6843_2.png) [@Izzy](https://community.glideapps.com/u/Izzy)
#### Post date: [May 18, 2020, 7:45pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/1 "2020-05-18T19:45:48Z")

</div>

Is there a way to lock columns from being edited by certain users?

Let’s say you have a Free and a Paid plan, both free and paid users share the same google sheet, the users on free plan would be able to see the “locked” columns but not be able to edit them. and users on paid plan can edit all columns (their columns are unlocked)

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [May 18, 2020, 9:04pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/2 "2020-05-18T21:04:32Z")

</div>

You’d need two different components…one, a text entry (Editable for pro) and a basic text (Non editable for basic users). Then set a visibility condition for each.

---

<div class="post-metadata">

### Author: ![Izzy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izzy/32/6843_2.png) [@Izzy](https://community.glideapps.com/u/Izzy)
#### Post date: [May 18, 2020, 9:08pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/3 "2020-05-18T21:08:35Z")

</div>

But can you set per column? e.g. 20 total columns (first 10 are unlocked, the rest of columns locked)

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [May 18, 2020, 9:35pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/4 "2020-05-18T21:35:05Z")

</div>

Users will have access to the sheet itself you mean? No…not if they’re making their own copies of the app (and this copies of the sheet). They become sheet owners and thus have admin rights to the sheet.

---

<div class="post-metadata">

### Author: ![Izzy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izzy/32/6843_2.png) [@Izzy](https://community.glideapps.com/u/Izzy)
#### Post date: [May 18, 2020, 9:37pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/5 "2020-05-18T21:37:15Z")

</div>

No, not access to the sheet or to copy the app. Just able to edit the rows in columns but limited to only those columns that are “unlocked”

---

<div class="post-metadata">

### Author: ![Izzy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izzy/32/6843_2.png) [@Izzy](https://community.glideapps.com/u/Izzy)
#### Post date: [May 19, 2020, 2:00pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/6 "2020-05-19T14:00:18Z")

</div>

I figured out how this is possible by selecting the “component” in my case this is each column in google sheet, and using visibility by selecting “add condition” and using show column when email is function.

This works for locking/unlocking columns in your spreadsheet to certain users but in my case this would make it too hard to maintain and having to add user emails to each component

I was hoping for an easier way to do this like having a sheet in your googlesheet with the list of emails to apply the visibility function

---

<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: [May 19, 2020, 2:38pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/7 "2020-05-19T14:38:47Z")

</div>

You have the right idea with visibility. If you add user profiles to your app, then you can have a sheet that will hold all of the signed in users and you can assign rolls to each user. User profile information is accessible everywhere in the app, including visibility, so you can set your condition to just look at the user’s roll instead of adding a condition for each individual email.

[https://docs.glideapps.com/all/reference/privacy-and-per-user-data/user-profiles](https://docs.glideapps.com/all/reference/privacy-and-per-user-data/user-profiles)

---

<div class="post-metadata">

### Author: ![Izzy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izzy/32/6843_2.png) [@Izzy](https://community.glideapps.com/u/Izzy)
#### Post date: [May 19, 2020, 3:07pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/8 "2020-05-19T15:07:43Z")

</div>

Perfect! Yes, the component visibility with free/paid users will work great (much easier to manage) thank you

---

<div class="post-metadata">

### Author: ![Izzy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izzy/32/6843_2.png) [@Izzy](https://community.glideapps.com/u/Izzy)
#### Post date: [May 19, 2020, 3:52pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/9 "2020-05-19T15:52:29Z")

</div>

Hi Jeff, it didn’t specify but on the “users” sheet, will Glide app automatically add the email of user? if so, will it add multiples or just 1 email per unique user?

---

<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: [May 19, 2020, 4:30pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/10 "2020-05-19T16:30:54Z")

</div>

Yes, new sign ins will automatically add the email to the sheet. This should add it only once per user, even if they sign in on a different device or sign out and sing back in.

---

<div class="post-metadata">

### Author: ![Izzy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izzy/32/6843_2.png) [@Izzy](https://community.glideapps.com/u/Izzy)
#### Post date: [May 19, 2020, 4:38pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/11 "2020-05-19T16:38:15Z")

</div>

Ok so in that case, the “Access Level” column should be pre-filled?

---

<div class="post-metadata">

### Author: ![Izzy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/izzy/32/6843_2.png) [@Izzy](https://community.glideapps.com/u/Izzy)
#### Post date: [May 19, 2020, 4:40pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/12 "2020-05-19T16:40:32Z")

</div>

Alternatively, could I input the emails myself? this way, I can assign the “access level” per user email.

---

<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: [May 19, 2020, 5:01pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/13 "2020-05-19T17:01:51Z")

</div>

How you fill it is up to you. You can fill the access level manually, or have some other process that fills it. You could structure you visibility conditions to treat ‘Free’ and Blank the same, and ‘Paid’ would trigger a different set of conditions.

Yes, I think you should be fine with entering the emails yourself if you choose. I’m assuming that Glide checks if the email already exists before adding a new row.

---

<div class="post-metadata">

### Author: ![Naos\_Wilbrink](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/naos_wilbrink/32/769_2.png) [@Naos\_Wilbrink](https://community.glideapps.com/u/Naos_Wilbrink)
#### Post date: [May 29, 2020, 9:18am UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/14 "2020-05-29T09:18:40Z")

</div>

> [@Jeff\_Hager](#):
>
> Yes, new sign ins will automatically add the email to the sheet. This should add it only once per user, even if they sign in on a different device or sign out and sing back in.

Do note that there is still an issue with case sensitivity and mail. For some reason people will login with upper case mail, then camel case mail then lowercase mail. Glide will see this a the same email. So only one entry, however if you use the MAIL param special value and post it to a related table, the mail posted and in the related table need to be the same casing. Other wise it won’t show in your join.

---

<div class="post-metadata">

### Author: ![Jeremiah\_Shackelford](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeremiah_shackelford/32/66645_2.png) [@Jeremiah\_Shackelford](https://community.glideapps.com/u/Jeremiah_Shackelford)
#### Post date: [November 21, 2023, 7:15pm UTC](https://community.glideapps.com/t/can-you-lock-columns/9387/15 "2023-11-21T19:15:10Z")

</div>

Easiest way to do something like that for different users is with 2 screen components:  
a TEXT compnent visable to “ReadOnly” users and  
a TEXT ENTRY componenet visible to “Read/Write” users

You could also create a “locked” version of the column in question to your table-but it would be locked for everyone.  
To do that, just create a template column with just one element: the column you want a “locked” version of.  
You would still end up having to create 2 screen components visible to different users, but you might (depending on what screen component you are using) be able to use the same kind of component for a more uniform look.  
I’m pretty sure you can’t point a TEXT ENTRY component at a “read only” column though.
