ON OFF default value does not display

Describe the bug:
When i create a switcher or checkbox button I don’t have the field default value ON/OFF except if I do it on a form

Expected Behaviour:
When I create the button the field should appear

How to replicate:
Do the same as described. I update the page many times and deleted the cookies but still not working

What do you mean when you say that the button does not appear? Is this the two conditional on/off switches that you created earlier? Are your visibility conditions checking for ‘true’ and ‘not true’, or are you checking for ‘true’ and ‘false’? Booleans can either be true, false, or blank, so it’s always a good idea to never check for false and always check for ‘true’ or ‘not true’ instead. Once a boolean is set to true or false, it will never be blank again unless your deliberately clear it

I’m not sure why you would need a default value unless you want to default it to ON. You do always have the option to set values when navigating to the record with a custom action. In the custom action, you can check for an empty boolean and then set columns to set it, followed by show details. Else, just show details.

Generally, when you are editing an existing row (unlike a form), it doesn’t make sense to have a default value because it’s just pulling the existing value for you to edit.

Well, screenshots will explain better than me…

Did you try on GDE ? Could you see the default value on ON?

What I am trying to figure out is something new just a button to switch between 2 languages, but I cannot have default value. That is why I posted in BUG section.

When editing an existing value in the existing row that you are viewing, you can’t have a default because it is already pulling the existing value from the column in the row you are viewing. Because of that, I wouldn’t consider it a bug that you don’t see a setting for a default value. The switch should be displaying whatever is in the column. Like I said above, it really doesn’t make sense to set a default on a value that already exists. This is very different compared to a form, where a row doesn’t exist yet until the form is submitted. In this case you already have a row, so there isn’t a need to set a default value.

Wouldn’t it be better if your “default” value was the same as ‘not true’? Then if the boolean column is empty or false, it would be the same as having a default value until a user changes it.

I think I understand what you want, but I don’t think that expecting to see a default value option makes sense in this case, because you already have a row that you are editing. I think in this case it would make more sense to reverse you thought process and make ‘not true’ (which would cover both blank and false) your default value and have the user turn the switch ON (‘true’) if they want something other than the default. Or maybe reconsider your app flow for this part of your app.

3 Likes

Thank you. I think I will go that way.

1 Like

Closing due to inactivity. This topic will be deleted in a few weeks if there are no more comments.