My app’s URL: https://mitbagsvaerd.glideapp.io/
- Install the app
- Click takeaway
- Click Cafe Sisko
- Scroll down
Notice that two components are present: “Vis takeaway information” and “Skjul takeaway information”
- Click “Vis takeaway information”
Notice that the button now disappears"
- Click “Skjul takeaway information”
Notice that the button disappears
One button shows when a single value component based on a (user-specific) boolean is true and the other buttons shows when the same variable is false.
But both buttons are shown initialially
The variable for controlling the visibility (“Vis Takeaway”) is found on the Glidesheets tab “Virksomhed” and is a single value component which is set by the user-specific variables (“Vis Takeaway”) found on “Hjem”
I expect is has something to do with the initialization of the single value component (or the user-specific variable) - as it seems it doesn’t have a value from the start.
@mark - can you help out here
Are you wanting only 1 to be true when it first initializes? If so just make the toggle that is visible when false also visible when empty. use the “OR” option.
@Drearystate thanks for the workaround
But I believe it is still a bug that needs fixing
I think the intent was some people may need to see a toggle that true and false were intended for things like off and on or good and bad, etc. Glide wanted to show when it hasn’t been accessed at all. Hence the option for visibility on empty.
This is a similar situation whenever a Boolean field hasn’t been given a value yet. It looks as if it’s false, but really it’s empty. For me, the best setting has just been to say if it’s not true. This covers when it’s empty and when it’s false.
This. I learned this the hard way when one of my app broke down months ago.
@Krivo What everyone is saying is correct. The Glide back end as it is now has 3 states for a boolean. True, False and Null (never set true or false). It is something we are aware of and changing it to return False if Null, could possibly break other places that rely on the null state.
As others have noted just use “is True” and “is not True” to determine the state of the value. I’ll suggest that we document that fact better to make it clear of how boolean values are treated.