# Disappearing number input when using conditional visibility

**URL:** <https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938>\
**Category:** Report a Bug\
**Created:** [February 26, 2020, 6:03am UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938 "2020-02-26T06:03:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![johannth](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/johannth/32/3846_2.png) [@johannth](https://community.glideapps.com/u/johannth)\
**Post date:** [February 26, 2020, 6:03am UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/1 "2020-02-26T06:03:28Z")

</div>

## The Bug

I have a weird and kind of hard to reproduce bug where form inputs disappear while using the app without any changes to the sheet.

The app always starts out working and I’ve never been able to reproduce it in the web editor but after a while, the form stops working. My hunch is that it only happens after the display goes to sleep or the app goes into the background. Force closing the app always fixes the problem and the form input appears again on a fresh start.

It should look like the form on the right (and often does) but fairly frequently it looks like the form on the left (without any changes to the sheet)

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

## Details

I have a Single Value column that is used to control the visibility of two “Number Entry” fields in a form.

The idea is that the Single Value toggle chooses which of the input gets visible.

* * *

Any ideas what could be causing this? Is this a bug in Glide or in my app setup? My app’s url is: [lyftingar.glideapp.io](http://lyftingar.glideapp.io)

---

<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 26, 2020, 2:40pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/2 "2020-02-26T14:40:28Z")

</div>

I don’t see that visibility condition in your app. Did you remove it? Could you maybe make a copy of your app in the state where it shows the error so that I can investigate?

---

<div class="post-metadata">

**Author:** ![vijay](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vijay/32/3259_2.png) [@vijay](https://community.glideapps.com/u/vijay)\
**Post date:** [February 26, 2020, 4:24pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/3 "2020-02-26T16:24:53Z")

</div>

Is the single value column toggle part of the form? If so, it is making the form input dissappear without affecting the google sheet. This is a bug that has been mentioned before. Any form input which is used as conditional visibility condition makes the thing dissappear without affecting the google sheet data.

> [@Switch component data not showing up on Google sheets when it is a visibility condition](https://community.glideapps.com/t/switch-component-data-not-showing-up-on-google-sheets-when-it-is-a-visibility-condition/4824):
>
> My app’s URL: [studentapp.glideapp.io](http://studentapp.glideapp.io) I have a switch component on Connect With a Tutor tab named Cancel Request. This component is connected to Student Cancels Request column on the spreadsheet. This component will be visible when student email is not empty. And when user switches it, then the Student Cancels Request will become true. And, when Student Cancels Request data is true, then the tutoring request will not be visible on this page. When I switch this component, the tutoring request b…

---

<div class="post-metadata">

**Author:** ![johannth](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/johannth/32/3846_2.png) [@johannth](https://community.glideapps.com/u/johannth)\
**Post date:** [February 26, 2020, 5:22pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/4 "2020-02-26T17:22:45Z")

</div>

@Mark the visibility condition is still in the app. There is a menu tab called settings, that flicks the Single Value column on and off. Then there is a form button on the details page for each exercise that displays a form that uses the Single Value column to choose which input to display.

The weird thing is that a lot of other data is using the Single Value column and it all works well. Only the form inputs seem to flake out.

I reproduced the bug yesterday and looked at the spreadsheet and all the values seemed normal so I’m not sure I can copy the app in a certain state. It seems that the state goes haywire while running the app. Also because I have two inputs, one that should be visible when the value is TRUE and another when it is FALSE, and neither is showing it seems like the value is neither TRUE nor FALSE.

@vijay The single value toggle is not part of the form and I don’t turn that toggle on or off at all during normal execution of the app. However, there is a form in the Settings tab that can toggle it on and off, but it’s not the same form as the one that glitches out.

---

<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 26, 2020, 6:08pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/5 "2020-02-26T18:08:26Z")

</div>

@johannth Next time you see the bug, would you mind looking at the spreadsheet to check what the value in `Settings` sheet is? If it’s empty, then neither condition will work, because one of them checks `TRUE`, and the other checks `FALSE`. You could change the latter to say `is not TRUE`.

---

<div class="post-metadata">

**Author:** ![johannth](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/johannth/32/3846_2.png) [@johannth](https://community.glideapps.com/u/johannth)\
**Post date:** [February 26, 2020, 6:52pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/6 "2020-02-26T18:52:24Z")

</div>

I actually think I can reproduce it.

1. Open the app, navigate to a details screen of an exercise.
2. Press the Log Exercise button to open the form and note that the form has the Weight (lbs) input.
3. Wait until the iOS OS takes the app to sleep (screen goes off).
4. Open the app again
5. Press the Log Exercise button and notice that the Weight input has disappeared

I just had it happen, checked the spreadsheet and the value is FALSE

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/9/9117a221ccf4d261799ed6ef1e1341494fe886b4.png)

---

<div class="post-metadata">

**Author:** ![johannth](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/johannth/32/3846_2.png) [@johannth](https://community.glideapps.com/u/johannth)\
**Post date:** [February 26, 2020, 6:52pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/7 "2020-02-26T18:52:58Z")

</div>

In the data editor:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/e5e8cc8f517466357f2b670ce8ddfac2da0013ac.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:** [February 26, 2020, 8:03pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/8 "2020-02-26T20:03:51Z")

</div>

Is it possible that you have the screen filtered so it’s not pointing to a row in the sheet? Maybe it’s greyed out because there is no row to update.

---

<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 26, 2020, 9:41pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/9 "2020-02-26T21:41:17Z")

</div>

Ok, I can reproduce it now. Will investigate.

---

<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 26, 2020, 9:54pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/10 "2020-02-26T21:54:05Z")

</div>

@johannth If you happen to find an easier way to reproduce this I’d be much obliged.

---

<div class="post-metadata">

**Author:** ![vijay](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vijay/32/3259_2.png) [@vijay](https://community.glideapps.com/u/vijay)\
**Post date:** [February 27, 2020, 1:06am UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/11 "2020-02-27T01:06:00Z")

</div>

Thanks, that worked.

---

<div class="post-metadata">

**Author:** ![johannth](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/johannth/32/3846_2.png) [@johannth](https://community.glideapps.com/u/johannth)\
**Post date:** [February 27, 2020, 2:25am UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/12 "2020-02-27T02:25:34Z")

</div>

I’ll keep investigating. Thanks for having a look.

---

<div class="post-metadata">

**Author:** ![johannth](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/johannth/32/3846_2.png) [@johannth](https://community.glideapps.com/u/johannth)\
**Post date:** [February 27, 2020, 2:29am UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/13 "2020-02-27T02:29:50Z")

</div>

@Jeff_Hager The input with the conditional visibility is in a form that creates a new row so I guess it technically isn’t pointing to a row in the sheet. But it uses the Single Value from the row that owns the Detail View.

Something like this:

Row 1 in spreadsheet sheet A that has Single Value = False  
-\> Navigate to detail view of Row 1  
-\> Press form button  
-\> Form uses Single Value from Row 1 to show or hide the inputs  
-\> Submitting form creates a new row in Sheet B

This all works until the screen is put to sleep by the OS, then it seems that the form is reading the Single Value as null or something.

---

<div class="post-metadata">

**Author:** ![johannth](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/johannth/32/3846_2.png) [@johannth](https://community.glideapps.com/u/johannth)\
**Post date:** [February 27, 2020, 2:42am UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/14 "2020-02-27T02:42:44Z")

</div>

I’m actually unable to reproduce it now through the same method I could reliably do it earlier today. So, maybe it is fixed? 😃

---

<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 27, 2020, 4:52am UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/15 "2020-02-27T04:52:51Z")

</div>

We didn’t deploy anything that looks like it could have fixed it. It might just be a very odd to reproduce bug.

---

<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 28, 2020, 4:51pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/16 "2020-02-28T16:51:10Z")

</div>

@johannth Have you seen this bug again?

---

<div class="post-metadata">

**Author:** ![johannth](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/johannth/32/3846_2.png) [@johannth](https://community.glideapps.com/u/johannth)\
**Post date:** [February 28, 2020, 8:02pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/17 "2020-02-28T20:02:52Z")

</div>

I made the change you suggested and changed the visibility to IS NOT TRUE. Then the Lbs input never disappears (which makes my app more usable while here in US).

On a fresh install, everything works as expected. However, for curiosity sake, I let the OS take the app to sleep (3 mins), tried going into the Settings Tab, flicking the Default unit is Kilogram toggle on, go back to the form then I still see the Lbs input, not the Kg input as expected. So it seems that the the run-time app loses track of the Single Value and it is probably Null at this point. I tried this again after force closing the app and then toggling work and I always got the correct input.

At the same time I opened up the data editor on Web and the value updates in real-time there when I flick the toggle in Settings, suggesting that the sheet gets updated correctly.

Then I tried reproducing it again and it didn’t happen. _flips table_. So, a difficult bug, haha

So the bug seems to be still here, and reproduces sporadically after the app goes to sleep, never on fresh open. However, the IS NOT TRUE hacks works so this isn’t really a problem for me until I go back to Iceland. And then I can change the visibility condition again, haha.

---

<div class="post-metadata">

**Author:** ![johannth](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/johannth/32/3846_2.png) [@johannth](https://community.glideapps.com/u/johannth)\
**Post date:** [March 1, 2020, 11:36pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/18 "2020-03-01T23:36:40Z")

</div>

I created a much more simpler app that might make it a bit easier to debug the bug: [o5oeq.glideapp.io](http://o5oeq.glideapp.io)

It has the same general structure but removes all the extra data. I’ve been managing to reproduce it by setting iOS sleep to 30 seconds and having the OS put the app to sleep.

It seems that the Single Value is empty when it goes haywire, as it hides inputs that check for Is TRUE and Is False but shows test on Is Empty.

Hope it helps.

---

<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:** [March 3, 2020, 10:48pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/19 "2020-03-03T22:48:55Z")

</div>

I think we have a fix for this. It should deploy tomorrow. I’ll let you know and will ask you to test.

---

<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:** [March 4, 2020, 9:34pm UTC](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938/20 "2020-03-04T21:34:15Z")

</div>

@johannth Would you mind checking whether you can still reproduce this, please?

[Next page](https://community.glideapps.com/t/disappearing-number-input-when-using-conditional-visibility/4938.md?page=2)
