I can't assign a null value to a boolean why is that and what if i want it to be null and false means something
Hi Sara,
Booleans are meant to represent binary states like on/off or yes/no.If you need a third state, you can consider creating a static that has 3 records like so.Another option is to use 1 for True, 0 for False and -1 for Other.
Great idea to work around this,
Thank you
Good to hear it helped you out :)
Hello Sara,
OutSystems does not support null values except for identifiers, all other data types have an associated default value. You can learn more about data types here.
BTW may I know what is your use case for assigning null value to a boolean data type?
Junaid
Hello.
I answered this same question in classes just days ago.
Think of Boolean as a checkbox. Do you accept the terms and conditions? Do you have a driver's license? Are you bringing a pet? Until you say Yes, it is No. There is no Null, because the absence of answer is itself an answer.
In Actions, the same happens on each If. Unless it is True, it's False.
If your type of question is slightly different, the answers will also be.
Is this book any good? You can just say Yes or Bo. You also have the "I haven't read it yet". That is not a binary decision, but a ternary.