# Trigger visibility through "if-then-else" column

**URL:** <https://community.glideapps.com/t/trigger-visibility-through-if-then-else-column/31893>\
**Category:** Ask for Help\
**Created:** [September 17, 2021, 8:23am UTC](https://community.glideapps.com/t/trigger-visibility-through-if-then-else-column/31893 "2021-09-17T08:23:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martina\_G](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/martina_g/32/22597_2.png) [@Martina\_G](https://community.glideapps.com/u/Martina_G)\
**Post date:** [September 17, 2021, 8:23am UTC](https://community.glideapps.com/t/trigger-visibility-through-if-then-else-column/31893/1 "2021-09-17T08:23:31Z")

</div>

Hey guys,

I want to display a component based on the cases triggered through an “if-then-else” column.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/c/7c3271247061299e0b11d013a745e92548d70fe8.png)

Implementation goal: Component should be displayed for the first three cases and hidden for the else-case.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/0/c02b922b4f21d280bdd2e3aaccbf78ee5bdcf4ad.png)

Unfortunately this doesn´t work. Any cue?

---

<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:** [September 17, 2021, 8:38am UTC](https://community.glideapps.com/t/trigger-visibility-through-if-then-else-column/31893/2 "2021-09-17T08:38:13Z")

</div>

That looks like it should work to me.  
You are using AND in your visibility setting, which means that both conditions need to be met.  
Is that the case?

What do you see when you examine the data in the corresponding columns for the row you are viewing?

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [September 17, 2021, 11:26am UTC](https://community.glideapps.com/t/trigger-visibility-through-if-then-else-column/31893/3 "2021-09-17T11:26:48Z")

</div>

Looking at the cases, it appears that the else case is only possible when the Sparen list is exactly equal to 0.1 (that’s exactly what you want, right?).

Consequently the visibility of the component could be conditioned to “UserProfile\> Status Sparziel” is empty AND “Sparen list” is not equal to 0,1.

However it is only a change of point of view, it does not deviate from @Darren_Murphy’s observations and questions.

---

<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:** [September 17, 2021, 11:54am UTC](https://community.glideapps.com/t/trigger-visibility-through-if-then-else-column/31893/4 "2021-09-17T11:54:26Z")

</div>

@roldy makes a very good point. The “Sparen List” values look like they are the result of a math calculation, so it’s quite likely that the underlying values are not _exactly_ 0.1, etc.

Even through you might configure a math column to a single decimal place, this is only for display purposes. Glide will still store the precise value (including as many decimal places as are necessary), and use those in any subsequent calculations.

I wouldn’t mind betting this is your problem. If it is, a simple fix would be to enclose your math formula in a `round()` function, to force a single decimal place.

---

<div class="post-metadata">

**Author:** ![Martina\_G](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/martina_g/32/22597_2.png) [@Martina\_G](https://community.glideapps.com/u/Martina_G)\
**Post date:** [September 17, 2021, 7:08pm UTC](https://community.glideapps.com/t/trigger-visibility-through-if-then-else-column/31893/5 "2021-09-17T19:08:31Z")

</div>

@Roldy @Darren_Murphy Thanks for this quick evaluation. This helped a lot!

I changed tried to fix the problem now by checking the value in a different column.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/b/8be22a6903827d8da1f430cbcf8d0782412ba5de.png)

And set the visibility options like this:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/6/c629bcf2cd184e6f1b9fe9ef4f05e31705b2c10b.png)

Unfortunately this still doesn´t work. ,-( Do you still see a problem with different values in the “Sparen Ist” column?

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [September 17, 2021, 10:10pm UTC](https://community.glideapps.com/t/trigger-visibility-through-if-then-else-column/31893/6 "2021-09-17T22:10:01Z")

</div>

Again this should work. So the problem is elsewhere, let’s try to understand where.  
What is the formula contained in Sparen lst?  
If you don’t set any visibility conditions, does the component show? What if you set one condition at a time?  
Is the component in a detail screen? In an edit form? In add form?  
What kind of component is it?  
Does the component trigger an action?

---

<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:** [September 18, 2021, 2:34am UTC](https://community.glideapps.com/t/trigger-visibility-through-if-then-else-column/31893/7 "2021-09-18T02:34:38Z")

</div>

I would ask this question again:

> [@Darren\_Murphy](#):
>
> What do you see when you examine the data in the corresponding columns for the row you are viewing?

Sometimes in cases like this, it can turn out that you’re not viewing the row that you think you are viewing.  
If you use the [Data View](https://docs.glideapps.com/all/reference/glide-ui/layout#data) whilst in Layout mode to inspect the column values, it should be possible to figure out what’s going on.

---

<div class="post-metadata">

**Author:** ![Martina\_G](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/martina_g/32/22597_2.png) [@Martina\_G](https://community.glideapps.com/u/Martina_G)\
**Post date:** [September 18, 2021, 2:06pm UTC](https://community.glideapps.com/t/trigger-visibility-through-if-then-else-column/31893/8 "2021-09-18T14:06:57Z")

</div>

Guys, thanks for the good advice on how to check the problem. With this I found a filter wrongly added to the screen (not the component). After deleting it, the visibility option worked.

I learnt a lot again … 🙏 😂
