Have set up SS with a column that has either ‘TRUE’ or “FALSE” in each cell.
Formatted as Boolean.
How to Set default to “FALSE” and how to cchange value?
CALC guide is no help.
Thanks, as always,
⌡im [THE BookMan]
Have set up SS with a column that has either ‘TRUE’ or “FALSE” in each cell.
Formatted as Boolean.
How to Set default to “FALSE” and how to cchange value?
CALC guide is no help.
Thanks, as always,
⌡im [THE BookMan]
Like 90% of all Calc users you want to use a database instead of a spreadsheet where boolean fields contain boolean values to be edited by means of check boxes. You can define a default value for a database column and if Null (Empty) should be valid besides True/False.
If you format cells of an arithmetic calculator grid as boolean, zero will be displayed as FALSE and any other number will be displayed as TRUE. There is no default value in a spreadsheet because a spreadsheet has no concept of fields nor records. A spreadsheet does not even know any tables. Instead of a default value, you may evaluate missing entries as 0 (False).
If you want to be in control of how the 0 and 1 (or other numeric value) show up as “Boolean,” you can just format them as number formats with something like
\T\R\U\E;\T\R\U\E;\F\A\L\S\E
The first entry before the first ‘;’ is for positive numbers, the second is for negative numbers, and the third for 0. The backslash just means “literally this letter” since lots of letters have special meaning in a format code (hh for hours, etc.)
SuperSimpleTrueFalse.ods (8.9 KB)
So, just mark the column, right click, Format Cells… then put the above under Format Code. You get the idea, I hope, for “faking” what 0 and 1 look like. You could put in Yes or No, Doch or Gar nichts or whatever you wanted this way. Of course, as with all formatting, it’s a bit of a lie, and can ultimately cause confusion.
That does nothing else than the BOOLEAN
number format, except that it displays always the English terms TRUE/FALSE without adaption to the number format’s locale or system locale. If used in an English language locale it does not survive an ODF save/load cycle and will be replaced by the BOOLEAN
format instead (due to legacy Excel documents used such instead of the real boolean format). Btw, the equivalent better readable format code would be the string form "TRUE";"TRUE";"FALSE"
instead of each character individually escaped.
Exactly, the comment was about how to do a quick fix, already pointing out the locale issue at length, if the user comes across the need, as might come up given the line of the OQ.
I’ll admit predicting a need is a little too tangential, sorry.
That said, does another grumpy response that it should be a database help the OP more than a quick fake to possibly get the job done for now? Or is it the belief that each time Villeroy correctly says it ought to be a database the OP goes out and learns to use Base?
True, should use quotes rather than slashes. I did not realize that if in fact TRUE/FALSE it would get replaced on load cycle.