# Conditional visibility of components usage question

**URL:** https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993
**Category:** Ask for Help
**Created:** [November 14, 2019, 7:28pm UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993 "2019-11-14T19:28:42Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![fox](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/fox/32/1176_2.png) [@fox](https://community.glideapps.com/u/fox)
#### Post date: [November 14, 2019, 7:28pm UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/1 "2019-11-14T19:28:42Z")

</div>

Bravo on this feature release @Mark . Saw the announcement in app but haven’t seen in mentioned in the forums yet.

Quick question about implementation, is there a way this can be used which bases it on a condition of the signed in user?

Basically i’m trying to accomplish user roles where if the user has a role assigned of “x” they would be able to see the component.

---

<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 14, 2019, 7:34pm UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/2 "2019-11-14T19:34:09Z")

</div>

Not yet, but that’s definitely something that will be possible eventually.

---

<div class="post-metadata">

### Author: ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)
#### Post date: [November 15, 2019, 8:58am UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/3 "2019-11-15T08:58:26Z")

</div>

What is this used for then, can’t think 🤔

---

<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:12pm UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/4 "2019-11-15T15:12:47Z")

</div>

There are lots of things that this could be used for, but thinking back to a previous thread, I had created a small example to show or hide an image button based on the value in a different column. That example was intended to hide a button once a user had a count of 50 it more in a column…so they couldn’t submit not than 50 times for example. Another example would be to only show a button to allow someone to proceed if they agreed to terms and conditions. It’s probably one of those features that won’t make much sense until you run into a situation where you actually need it.

> [@Conditional button based on user](https://community.glideapps.com/t/conditional-button-based-on-user/1612/10):
>
> I threw together an example to Show/Hide an image button in [https://concepts.glideapp.io/](https://concepts.glideapp.io/) . It’s working using formulas in the sheet, but I couldn’t get it to work using the IF-THEN-ELSE column in the Data tab. See if it would work for your situation. I tried using the new IF-THEN-ELSE column to get the column value to equal the image URL, It works, but I still get an empty image placeholder that is clickable. I’m guessing Glide is still placing some sort of value in the virtual column that …

---

<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:12pm UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/5 "2019-11-15T15:12:52Z")

</div>

It’s very useful in forms, for example, where you might have to enter more information if you select a particular option.

I used it in a party RSVP app. If you select “Are you coming?”, you get new questions “Are you bringing a +1?”, and “Any dietary restrictions?”.

---

<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 17, 2019, 1:33am UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/6 "2019-11-17T01:33:35Z")

</div>

@mark, can you elaborate a little bit more on your RSVP app? I’m trying to see if I can control which entry components show based off of other components in an Add/Edit/Form scenario. It seems to work fine when in View mode. I’m just trying to establish if it’s possible or not.

---

<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 17, 2019, 1:43am UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/7 "2019-11-17T01:43:22Z")

</div>

I’m just discovering that we have a bug - in a screen where you edit a row (add/edit/form screen) the visibility should be conditional on the edited row, but right now it isn’t.

My RSVP app just used a regular detail screen with edit components.

---

<div class="post-metadata">

### Author: ![yinon\_raviv](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yinon_raviv/32/1627_2.png) [@yinon\_raviv](https://community.glideapps.com/u/yinon_raviv)
#### Post date: [November 17, 2019, 5:23am UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/8 "2019-11-17T05:23:27Z")

</div>

Sorry but what am I missing? Was there announcement in conditional components?  
Can someone share? Currently I create this myself with images …

---

<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 20, 2019, 2:29am UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/9 "2019-11-20T02:29:02Z")

</div>

@mark Seems to be working in Add/Edit mode

@yinon_raviv You can now add conditions to show or hide components based on other component or column values. Here are some screen shots that show how to do it.

Select a component to edit it’s details:

 ![Capture](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/4/4de9e013621effbd59452b581595f9023f070d19.jpeg)

Select the Features tab:

 ![Capture2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/b/b08020656b7e9bce9ecb8984f127054e63aa5d06.jpeg)

Add the condition you want:

![Capture3](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/c/c3154795bd9b98dc7e3c8007a59f4c94d01e527a.jpeg)

---

<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 20, 2019, 2:31am UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/10 "2019-11-20T02:31:47Z")

</div>

Yes, we fixed it 😉

---

<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 26, 2019, 1:40pm UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/11 "2019-11-26T13:40:55Z")

</div>

Documentation for visibility is here now: [https://docs.glideapps.com/all/reference/layout/component-visibility](https://docs.glideapps.com/all/reference/layout/component-visibility)

And I made my own version of Mark’s party invite app with conditional visibility. You can copy the app and check it out if you want. [https://partyinvite.glideapp.io/](https://partyinvite.glideapp.io/)

 ![24-1](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/0/0b5dd28ef649bd4f681bcb3ac1ffd35b48a381bb.gif)

---

<div class="post-metadata">

### Author: ![Cesar\_Huber](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/cesar_huber/32/5691_2.png) [@Cesar\_Huber](https://community.glideapps.com/u/Cesar_Huber)
#### Post date: [April 16, 2020, 11:55pm UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/12 "2020-04-16T23:55:35Z")

</div>

hey @Mark!! what’s up?

about the conditional visibility depending on the type of user, any news on that?  
I have tried a few alternatives, but wasn’t successful on any of my attempts.  
One of them, which I thought would work was a type of user column on the entry tab.  
Then, I would like to show, on a different tab, depending on the type of user an inline list.  
So, on that tab in glide, I associated it with the entry tab, where I had the column with the type of user, and added an inline list, adding a feature, conditional visibility, to that type column.  
But it just didn’t work.

Any ideas on how I could make it work?

Thanks a lot!

---

<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: [April 17, 2020, 12:06am UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/13 "2020-04-17T00:06:16Z")

</div>

We’re actively working on that.

---

<div class="post-metadata">

### Author: ![George\_Lewis1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/george_lewis1/32/5517_2.png) [@George\_Lewis1](https://community.glideapps.com/u/George_Lewis1)
#### Post date: [April 18, 2020, 10:11pm UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/14 "2020-04-18T22:11:18Z")

</div>

Hey guys,

I’m trying to build a two-side marketplace at the moment looking at a few no-code options, but am loving playing in Glide and following all the new releases/ features. Initially I had two apps/ one spreadie, but am now trying to convert to one app, after I realised you can’t comment between them which I was using as a 121 chat function.

I’ve had a few goes at this problem you’re talking about and one option seems to be working, but would like to know what you think and if it will scale with multiple users.

Under the profile section I have ‘users emails’ column and ‘user type’ column, then I have ‘if column’ that says ‘if users email is user that is signed in, show user type value’

Then in the tab I want to make different inline lists visible depending on user type (user 1 to see availability of user 2’s and user 2 to see jobs posted by user 1’s). I have 6 columns, just 1 row. The first two columns just say user 1 and user 2 in row 1; the next two are relation columns to match these values to the ‘if column’; the final two just show ‘user 1’ if that profile type is signed in or ‘user 2’ if that profile is signed in (you can use a look up to get the value from the ‘if column’ in profile sheet).

Then set inline lists on component visibility to be visible if your columns 5 & 6 show the profile type you want (inline list for user type 1 only if column 5 says ‘user 1’ etc.)

@Mark what do you think, is this the problem discussed or am I overcomplicating and there’s an easier solution? Do you think this scale with multiple accounts on the app, my assumption is the if column value will be unique for everyone, so it should work…?!

---

<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: [April 19, 2020, 1:11am UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/15 "2020-04-19T01:11:57Z")

</div>

@Cesar_Huber Here’s some more information on a method that I use for conditional visibility based on user type. Basically I use a template column to create a value, such as ‘Admin’. In my user sheet I have a similar user type value, but only on the users that have Admin access. I then create a relation column to link the template ‘Admin’ to the user’s user type column. Then I create a lookup column to pull back an array of user emails that match the value ‘Admin’. I can then use the lookup column for filtering or visibility based on signed-in-user.

@George_Lewis1 I’m really intrigued with your method. I might have to read through it a few times to see if I get some ideas. You don’t happen to have a sample app that you can share, do you?

> [@Newsletter Subscription](https://community.glideapps.com/t/newsletter-subscription/7291/4):
>
> You can control visibility and filtering based on a certain values. You can do this by putting a template, relation and lookup column on the content you want to control, and then pull back an email array of users that have access to that content. Then you can apply filtering and visibility of components based on that lookup column of emails by checking it against the signed in user. This would allow for one single app, but would require sign in for all users, but really comes down your your u…

---

<div class="post-metadata">

### Author: ![George\_Lewis1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/george_lewis1/32/5517_2.png) [@George\_Lewis1](https://community.glideapps.com/u/George_Lewis1)
#### Post date: [April 24, 2020, 9:25pm UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/16 "2020-04-24T21:25:49Z")

</div>

Hey I can’t share the app, but i can recreate one if helpful? Did you get it working? I tried your method and that works as well thanks 🙂 I’ll keep both in for now and see which one works when we’re scaling up!

---

<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: [April 24, 2020, 10:11pm UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/17 "2020-04-24T22:11:53Z")

</div>

@George_Lewis1 Thank you! The method I’ve used has worked well for me and others in the past, but as you’ve noticed in the other thread, I do understand how you method works now, so no need for a sample app. I do thank you for putting this thought process in my head. It definitely opens up a lot of opportunities to pull back much more data, per user, than just an array of emails. As you’ve noticed, there’s the potential to display all kinds of user specific data from other sheets or use it for filtering and visibility and I suppose it allows for passing those values into a form as well which could really be beneficial. I’m sure I’ll be referring to this much more from now on.

It will be interesting if you run into any scaling issues down the road. I suppose your method is much more efficient since you are only pulling back relevant data as opposed to the massive list of emails.

Again, thank you for this.

> [@List Relation "Data"](https://community.glideapps.com/t/list-relation-data/7659/5):
>
> BAM! I figured it out. First create an If/Then column on the user profile sheet that fills the column with the word ‘Name’ if signed in user. Next, on every sheet you want to display the name: Create a template column that contains the word ‘Name’. Create a relation column that joins the name template to the name template in the user profile sheet. Create a lookup column that gets the name from the relation. Bonus - make it look pretty. [image] [image]

---

<div class="post-metadata">

### Author: ![George\_Lewis1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/george_lewis1/32/5517_2.png) [@George\_Lewis1](https://community.glideapps.com/u/George_Lewis1)
#### Post date: [April 24, 2020, 10:47pm UTC](https://community.glideapps.com/t/conditional-visibility-of-components-usage-question/1993/18 "2020-04-24T22:47:10Z")

</div>

That’s great, excited to see what you guys do with it now!
