# Set default for boolean

**URL:** <https://community.glideapps.com/t/set-default-for-boolean/37038>\
**Category:** Ask for Help\
**Created:** [January 11, 2022, 4:50pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038 "2022-01-11T16:50:18Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [January 11, 2022, 4:50pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/1 "2022-01-11T16:50:18Z")

</div>

Hello, I would like to set a default for user specific boolean column. It seems that booleans in Glide are tri-state (blank, true, false). I cannot find a true boolean variable in Glide (true/false or on/off). Is there a way to specify the default value being false rather than blank (in the data editor – not the screen, because I want it to apply to all rows for that user).

---

<div class="post-metadata">

**Author:** ![George-Glide](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/george-glide/32/22384_2.png) [@George-Glide](https://community.glideapps.com/u/George-Glide)\
**Post date:** [January 11, 2022, 4:57pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/2 "2022-01-11T16:57:41Z")

</div>

What others have done is always test on True. Is true or is not true. This way you don’t need to worry if it is blank or false.

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [January 11, 2022, 5:17pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/3 "2022-01-11T17:17:11Z")

</div>

Thank you. In reality, I would also like to be able to set the default value to true in some cases. I am doing as you suggested and only checking for true.

The reason I would like to also check for false is because I have an action that depends on if false or blank, set to true, and if true set for blank, but there are other checks on other fields to determine if a third boolean column is actually set, and it’s been hard to get the action to work correctly without having to click twice. I got it working by rearranging the tests on the third column (which is an if-else with about 6 tests in it), but it would have been much simpler with only a true/false to worry about in the first boolean column.

---

<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:** [January 11, 2022, 5:34pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/4 "2022-01-11T17:34:56Z")

</div>

Do you have a screenshot of your actions? Are you actually checking for (blank OR false) as opposed to checking for (not true)? Just trying to get a visual of the problem. Setting a default is a different matter, but I’m not sure how that relates to you actions.

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [January 11, 2022, 6:02pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/5 "2022-01-11T18:02:09Z")

</div>

There are multiple actions and fields involved. First of all, if a user enters a new entry, no one else can see it in their main list unless the “global” field is set to true. In the main list, their only option is to select whether the entry is going to be visible in other places in the app (dropdowns, etc.). So I have a “pickable” field that determines whether it is in the main list and a “show in list” field which determines whether it will show up elsewhere.

This is with one user:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/d/6d0187aa19a05543a748a347823e1923620e2d51.png)

This is with another user:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/2/e20776dd0cac7d966756de482b7bde51e87aed17.png)

Here is “pickable”

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

Here is “show in list”

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

It works as-is.

I would like to have a user-specific field to make it pickable (global), but default to FALSE for “show in list”. Right now that’s not possible because a blank is determined to be false, and I don’t want them to ALL be false.

I had it working somewhat yesterday, but then realized it needed to be user-specific so I took out the field I had added (“default to false”)…

---

<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:** [January 11, 2022, 6:26pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/6 "2022-01-11T18:26:30Z")

</div>

OK, I still need to read through this a few times and absorb it, but one red flag that I see is that in your ‘Show In List’ column, you are explicitly checking for false. Are you sure you want to do that as it will ignore if ‘Is Favorite’ is blank. Are you sure that you don’t want to to include blank by check for ‘is not true’ instead of checking for ‘false’? I just want to make sure that is your intention. Maybe that’s what you are getting at with setting a default.

I’m also a little confused on if Pickable is supposed to play a part in your Show In List column, since you are using Is Favorite, but not Pickable anywhere in the IF logic.

Is the main issue with your ‘Show In List’ IF column? I may be way off, but I would maybe structure it like this.  
IF Global is true, then true  
ELSEIF Favorite is True, then True  
ELSEIF Owner is Owner, then True  
ELSE false

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [January 11, 2022, 7:45pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/7 "2022-01-11T19:45:41Z")

</div>

> [@Jeff\_Hager](#):
>
> in your ‘Show In List’ column, you are explicitly checking for false. Are you sure you want to do that as it will ignore if ‘Is Favorite’ is blank. Are you sure that you don’t want to to include blank by check for ‘is not true’ instead of checking for ‘false’?

Yes, I am ignoring blank because I want them to see it in the list unless they explicitly set it to false. And the way I have it in the show in list column works the way I have it. If I have it any other way, when they are on the screen to pick which ones show in the list, they have to click twice to toggle the flag (the first time it’s toggled).

As I said, the way it’s presented here works. I just want to expand the logic to explicitly set some of them to “view in list” as false before the user selects that setting. SOME – NOT ALL.

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [January 12, 2022, 5:23am UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/8 "2022-01-12T05:23:30Z")

</div>

Is true 😉 I’ve never used these plugins before but I’ve always been curious when I might. I hope it helps you find what your looking for.

> **[Is Falsey column • Glide](https://www.glideapps.com/plugins/falsey#)**
>
> True if value is false or false-like, otherwise false.

> **[Is Truthy column • Glide](https://www.glideapps.com/plugins/truthy#)**
>
> True if value is true or true-like, otherwise false.

> **[Not column • Glide](https://www.glideapps.com/plugins/not)**
>
> True becomes false. False (and blank) become true.

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [January 12, 2022, 2:21pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/9 "2022-01-12T14:21:14Z")

</div>

Hi, I looked at those, but never tried to implement them. I, too, hope that I will find a use for them one day. The following graphic illustrates the value they give when operated on the “is fav” user-specific column.

The column I added yesterday and then removed, I put back in just for illustration purposes here.

I really need a “default to false” that acts in a user-specific way.

There may be hundreds of items in the list (pre-populated, but the user may add their own).

Later in the program, the user can choose from their favorites. Probably only want a manageable list elsewhere of a few dozen items. But I want them to be able to pick their favorites from the hundreds available (on one screen). That’s the screen I’m needing this default to false user-specific. I want it to show on the screen, so they can explicitly set it to true or false. If they have not visited the screen, I want the items that I have selected to be either true or false – a default list for them.

“default to false” here is included in the image for illustration purposes only. I had it working, but removed it after I realized it had to be user-specific as well as “is favorite”. I cannot set these defaults myself on a user level because there are so many users, so I’d need some way to indicate that for any user, the column “is favorite” should default to false if it has never been set.

I cannot use “blank” as that default, because then _every_ record would literally be default to false. So perhaps “default to true” would be a better way of putting it. I want a few dozen of the hundreds to “default to true”

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

---

<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:** [January 12, 2022, 3:06pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/10 "2022-01-12T15:06:36Z")

</div>

> [@David\_Gabler](#):
>
> I cannot set these defaults myself on a user level because there are so many users, so I’d need some way to indicate that for any user, the column “is favorite” should default to false if it has never been set.

Perhaps I’m missing something, but could you not just:

- Create an if-then-else column  
– If `Is Favourite` is empty, then `false`  
– Else `Is Favourite`
- And then use that column in place of the Is Favourite column when checking the status

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [January 12, 2022, 3:12pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/11 "2022-01-12T15:12:05Z")

</div>

No, I am the one that was missing something: that the “else” does not have to be true or false, but can be a column.

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

I will give that a try.

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [January 12, 2022, 3:49pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/12 "2022-01-12T15:49:38Z")

</div>

Everything started clicking when I changed my mindset from “default to false” to “default to true”. It just has to be far enough down this list and then it doesn’t have to be user-specific.

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

I also simplified this column by using the computed “pickable” column, which takes into account the “global” flag and the @owner.

I’m a happy camper. Thank you to all who helped me sort this very complicated issue out.

I appreciate all the helpful suggestions.

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [January 12, 2022, 4:00pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/13 "2022-01-12T16:00:28Z")

</div>

> [@David\_Gabler](#):
>
> I really need a “default to false” that acts in a user-specific way.

If you point the plug-in to a user specific column then the plug-in becomes user specific as well. It sounds like you’re looking for ‘Not’

> [@Eric\_Penn](#):
>
> [Not column | Glide](https://www.glideapps.com/plugins/not)

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [January 12, 2022, 4:03pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/14 "2022-01-12T16:03:13Z")

</div>

Yes, I tried that, but again, that empty. I simply needed a default list that was applicable to all users but that they could override. I finally figured out a way to make that happen.

---

<div class="post-metadata">

**Author:** ![Marcus\_Shamase](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcus_shamase/32/45840_2.png) [@Marcus\_Shamase](https://community.glideapps.com/u/Marcus_Shamase)\
**Post date:** [October 22, 2022, 5:17pm UTC](https://community.glideapps.com/t/set-default-for-boolean/37038/15 "2022-10-22T17:17:20Z")

</div>

This one worked for me. Thanks
