How to set default value on Yes/No

Hello and thank you in advance!

How do I to set default value on Yes/No?

2023-03-31 10_31_34-Threshold Sample App 2023 v3.png

0 8 442
8 REPLIES 8

Aurelien
Google Developer Expert
Google Developer Expert

Hi @nhrz 

Here:

Aurelien_0-1680277851830.png

 

Set the value TRUE or FALSE on the yellow part.

Hi @Aurelien 

Thank you for your reply, I did add FALSE and refreshed the page twice but the nothing happens. Could you tell me what I did wrong?

2023-03-31 11_33_22-Threshold Sample App 2023 v3.png

2023-03-31 10_31_34-Threshold Sample App 2023 v3.png

Aurelien
Google Developer Expert
Google Developer Expert

Can you try clicking on "Cancel" then click on the "Add" button again ?

This way, the form will be initialized properly. 

Hi @Aurelien 

I did refresh the page, "cancel" and "add", even create entire new form, still nothing. Do you have any more advice? 

Try using equality and inequality for Yes/No values, I tend to use those to not worry about any localization stuff.

Anything can be used but the most simple would be

Yes:
0=0
No:
0=1
 

Aurelien
Google Developer Expert
Google Developer Expert

Hi @nhrz 

I just ran a test on a sandbox app, and recorded a GIF.

This way, you can visually get how to set the option. Can you confirm you see this?

Screen Recording 2023-04-01 at 05.56.17.37 PM.gif

Also, just to confirm, make sure @nhrz you are not adding any quotes to the False value

False instead of "False"

Aurelien
Google Developer Expert
Google Developer Expert

Also @nhrz 

I noticed that in your screenshot, the column name seems not being modifiable: 

Aurelien_0-1680367077370.png

That makes me think you are not using a spreadsheet but rather a "standard" database.

Can you make sure the column type from your database allows a boolean value?

Top Labels in this Space