# Setting a visibility condition for a component on that is dependent on a Relationship Value

**URL:** https://community.glideapps.com/t/setting-a-visibility-condition-for-a-component-on-that-is-dependent-on-a-relationship-value/12230
**Category:** Ask for Help
**Created:** [July 9, 2020, 7:40pm UTC](https://community.glideapps.com/t/setting-a-visibility-condition-for-a-component-on-that-is-dependent-on-a-relationship-value/12230 "2020-07-09T19:40:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Fassil\_Befekadu](https://avatars.discourse-cdn.com/v4/letter/f/df705f/32.png) [@Fassil\_Befekadu](https://community.glideapps.com/u/Fassil_Befekadu)
#### Post date: [July 9, 2020, 7:40pm UTC](https://community.glideapps.com/t/setting-a-visibility-condition-for-a-component-on-that-is-dependent-on-a-relationship-value/12230/1 "2020-07-09T19:40:00Z")

</div>

When users fill submit information via a Form, it results in a Relationship value (that I am tracking via a Lookup in my sheet) being incremented by 1. I would like to set a visibility condition that tracks this such that when the Relationship value is “X” the component does not show. But if the Relationship Value becomes “X+1” (which happens when someone submits the Form) it does.

I would appreciate any thoughts on how I can do this.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 9, 2020, 11:14pm UTC](https://community.glideapps.com/t/setting-a-visibility-condition-for-a-component-on-that-is-dependent-on-a-relationship-value/12230/2 "2020-07-09T23:14:39Z")

</div>

I don’t quite understand this. If you have that Relationship value calculated already, what’s preventing you from using that as a condition in your visibility settings?

---

<div class="post-metadata">

### Author: ![Fassil\_Befekadu](https://avatars.discourse-cdn.com/v4/letter/f/df705f/32.png) [@Fassil\_Befekadu](https://community.glideapps.com/u/Fassil_Befekadu)
#### Post date: [July 9, 2020, 11:27pm UTC](https://community.glideapps.com/t/setting-a-visibility-condition-for-a-component-on-that-is-dependent-on-a-relationship-value/12230/3 "2020-07-09T23:27:47Z")

</div>

Prior to the Form submission, the Relationship value is X. After submission, it is X+1. I do not want a component to be visible if ‘X’ but I do want it to be visible if ‘X+1’. I could not figure out a way to tie the visibility to the Relationship value when all I know is that X goes up by 1. How do I create logic that tracks if a cell goes up by 1? Maybe it is simple logic that I cannot figure out?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 9, 2020, 11:39pm UTC](https://community.glideapps.com/t/setting-a-visibility-condition-for-a-component-on-that-is-dependent-on-a-relationship-value/12230/4 "2020-07-09T23:39:44Z")

</div>

Is X a static number? What is the logic behind that?

---

<div class="post-metadata">

### Author: ![Fassil\_Befekadu](https://avatars.discourse-cdn.com/v4/letter/f/df705f/32.png) [@Fassil\_Befekadu](https://community.glideapps.com/u/Fassil_Befekadu)
#### Post date: [July 9, 2020, 11:47pm UTC](https://community.glideapps.com/t/setting-a-visibility-condition-for-a-component-on-that-is-dependent-on-a-relationship-value/12230/5 "2020-07-09T23:47:25Z")

</div>

The logic was based on a billing app I created that utilized the method outlined in the below link to make sure that previously selected choices have been eliminated:

> [@Eliminate choices after they've been selected: Many-to-many relations](https://community.glideapps.com/t/eliminate-choices-after-theyve-been-selected-many-to-many-relations/9726):
>

X is not static. It represents the Relationship outlined in the above link that keeps track of the selected choices. Every time a choice is selected, Relationship value is incremented by 1, and the number of choices reduced. I hope that makes it cleared.

Thanks for your help on this, @ThinhDinh.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [July 10, 2020, 1:42am UTC](https://community.glideapps.com/t/setting-a-visibility-condition-for-a-component-on-that-is-dependent-on-a-relationship-value/12230/6 "2020-07-10T01:42:10Z")

</div>

Would you need to set this multiple times? As in if X = 1 then component 1 is visible, then if another form is submit then component 1 is not visible, show component 2 and the list goes on?
