# Possible bug in visibility condition

**URL:** <https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041>\
**Category:** Report a Bug\
**Created:** [December 20, 2019, 5:59pm UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041 "2019-12-20T17:59:02Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mthakershi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mthakershi/32/1715_2.png) [@mthakershi](https://community.glideapps.com/u/mthakershi)\
**Post date:** [December 20, 2019, 5:59pm UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/1 "2019-12-20T17:59:02Z")

</div>

Hello. Good to see glide added way to control visibility based on multiple conditions (AND / OR). Thanks. However, it seems like there may be an unrelated bug?  
I have two sheets A and B. B has a relation column based on a matched column present in both sheets. B has a lookup column based on the relation column. B does show proper value for the lookup column. In B, first two rows for the lookup column have values while last three rows value is blank.

Now, in layout, when I build a condition on this lookup column, “is empty” and “is not empty” behave in opposite way. As if there is a bug in if/else in your code - there content has been switched - wrongly.

I have attached a screenshot explaining this bug.

 ![Screen Shot 2019-12-20 at 11.20.36 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/1/151edf4b8b9963ae25164e0da85a7d8662d3a05a.png)

---

<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:** [December 23, 2019, 1:53pm UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/2 "2019-12-23T13:53:36Z")

</div>

> [@Bug in visibility on form](https://community.glideapps.com/t/bug-in-visibility-on-form/3093/3):
>
> I think the problem is when you attempt the set a visibility condition (in edit mode) against a value that is not editable on the screen. I don’t think it’s an issue with the multiple conditions (at least I haven’t seen an issue yet). I did a little experiment where I set a visibility condition on a checkbox based on another value that is filled in the sheet, but not displayed on the edit screen. I set the condition to display the checkbox if the other value is not empty. Like you have obser…

---

<div class="post-metadata">

**Author:** ![mthakershi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mthakershi/32/1715_2.png) [@mthakershi](https://community.glideapps.com/u/mthakershi)\
**Post date:** [December 25, 2019, 2:42am UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/3 "2019-12-25T02:42:16Z")

</div>

I was too fast to conclude. Actually as Jeff said, this workaround didn’t fix this situation because condition for visibility is based on a formula field which presents some constraints when deploying this workaround.

1. If I put the formula field on the form and make it hidden, on submit the value is overwritten in the sheet which invalidate the entire column because it is an array formula. To fix this, I deployed a time-driven trigger in spreadsheet that applies formula to the column every minute. This is not a good workaround because it modifies the entire column (not just that particular cell related to the record). It will adversely affect other user’s state. Plus running a trigger every minute is resource consuming.
2. The InviterCount is basically # of items in the inline list. When I add / delete items from the list, the text entry isn’t updated. It is updated only once when form opens. That doesn’t work with the condition.
3. I tried to pull InviterCount in the “Add a family member” screen to see if I could build a condition there but it presents the exact same issues as mentioned in 1 and 2.

 ![Screen Shot 2019-12-25 at 8.01.57 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/f/ffc0c9c49aed435a1be1f0056618d1d80699456a.png)

---

<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:** [December 25, 2019, 3:04am UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/4 "2019-12-25T03:04:34Z")

</div>

Sorry about those limitations. We will fix them in due course.

---

<div class="post-metadata">

**Author:** ![mthakershi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mthakershi/32/1715_2.png) [@mthakershi](https://community.glideapps.com/u/mthakershi)\
**Post date:** [December 27, 2019, 10:28am UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/5 "2019-12-27T10:28:13Z")

</div>

There is another issue with the workaround. If cell value with formula changes (added a family member) and then I press “Done”, it overwrites the correct value with literal old value. Invalidating entire column with first cell which has ArrayFormula reading like “Array result was not expanded because it would overwrite data in…”. Now even my time-driven trigger can’t fix this column.

Please fix this on priority.

---

<div class="post-metadata">

**Author:** ![Lighted\_Candle](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lighted_candle/32/29544_2.png) [@Lighted\_Candle](https://community.glideapps.com/u/Lighted_Candle)\
**Post date:** [December 27, 2019, 6:38pm UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/6 "2019-12-27T18:38:04Z")

</div>

Create two separate sheets  
One where your form will submit to and one that will present your data the way you want.  
You don’t have to use the same sheet for submit and present

Run a query formula to pull the data you need over the present sheet, this way you have no conflict.

In glide you can select the form sheet for the form button and the presenter sheet for the component view but turn off editing.

---

<div class="post-metadata">

**Author:** ![mthakershi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mthakershi/32/1715_2.png) [@mthakershi](https://community.glideapps.com/u/mthakershi)\
**Post date:** [December 29, 2019, 4:57am UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/7 "2019-12-29T04:57:04Z")

</div>

Thanks. I will explore this option of two sheets. Looks like it has many uses. But for now, I wrote a time-driven trigger on my sheet that detects first cell value as “#REF!” of the column in question. Then it clears entire column and then assigns the formula to the first cell. This works as a workaround for now. I hope glide team fixes the issue of fetching field values which are used on the form in conditions or other purpose. This will not need a workaround after that.

Thanks all for help so far.

---

<div class="post-metadata">

**Author:** ![mthakershi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mthakershi/32/1715_2.png) [@mthakershi](https://community.glideapps.com/u/mthakershi)\
**Post date:** [February 12, 2020, 6:02pm UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/8 "2020-02-12T18:02:26Z")

</div>

Glide staff, is there any update on this bug? Thanks.

---

<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:** [February 12, 2020, 8:41pm UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/9 "2020-02-12T20:41:54Z")

</div>

This should be fixed by now. Is it not?

---

<div class="post-metadata">

**Author:** ![mthakershi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mthakershi/32/1715_2.png) [@mthakershi](https://community.glideapps.com/u/mthakershi)\
**Post date:** [February 14, 2020, 6:57am UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/10 "2020-02-14T06:57:29Z")

</div>

It is fixed.

---

<div class="post-metadata">

**Author:** ![pipharvester](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pipharvester/32/61697_2.png) [@pipharvester](https://community.glideapps.com/u/pipharvester)\
**Post date:** [May 20, 2020, 9:53pm UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/11 "2020-05-20T21:53:23Z")

</div>

I must not understand the visibility logic. I need to add conditions and want one that is first and want to add one with “OR” and then add another with “AND” and might even need another with something…but appears that no matter what I need the choice I make for the 2nd condition as to OR/AND will also be the one for the 3rd and 4th etc. The AND/OR choice does not move down below the last one added and the new one being setup. Am I correct?

Jerry

---

<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 20, 2020, 10:05pm UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/12 "2020-05-20T22:05:34Z")

</div>

Can’t have both OR and AND. What I do is create the OR logic in the data editor as its own if-then-else column. Then use that column in conjunction with another value using AND in the visibility.

---

<div class="post-metadata">

**Author:** ![pipharvester](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pipharvester/32/61697_2.png) [@pipharvester](https://community.glideapps.com/u/pipharvester)\
**Post date:** [May 21, 2020, 3:32am UTC](https://community.glideapps.com/t/possible-bug-in-visibility-condition/3041/13 "2020-05-21T03:32:03Z")

</div>

Thank you Robert. Do you have an example that I could possibly see or more details as to this since I have not seen or used this setup.

Jerry
