Bug 94751 - Test ( <> 1 ) on boolean field containing <unknown> produces <FALSE> as result
Summary: Test ( <> 1 ) on boolean field containing <unknown> produces <FALSE> as result
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-04 09:12 UTC by moebius20
Modified: 2016-06-03 11:24 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description moebius20 2015-10-04 09:12:46 UTC
Well, everything is in title...

When I test a boolean field that contain no value (neither YES nor NO) with <> 1 (I suppose it's the same than NOT YES, LO returns FALSE.
Comment 1 Alex Thurgood 2015-10-06 11:32:43 UTC
Boolean fields in LO are tristate - unset, true or false, so perhaps you could try testing for "= -1" instead ?
Comment 2 moebius20 2015-10-06 11:43:59 UTC
(In reply to Alex Thurgood from comment #1)
> Boolean fields in LO are tristate - unset, true or false, so perhaps you
> could try testing for "= -1" instead ?

Well, I don't exactly see what is the value -1 in this case...But, Sure I can test that, thanks
Comment 3 Alex Thurgood 2015-10-06 13:22:55 UTC
-1 is the unset state
Comment 4 Alex Thurgood 2015-10-06 13:25:31 UTC
@moebius : you don't say how you are testing the value :

- directly as SQL tp the underlying table ;
- via a form containing a control bound to a field ;
- via macro with DatabaseContext.

The results of the test might vary depending on which method you are using.
Comment 5 Alex Thurgood 2015-10-06 13:28:24 UTC
See also :

https://forum.openoffice.org/en/forum/viewtopic.php?f=42&t=5251


We also need the LO version you are using (you didn't say which in your report), and whether or not you are using a distrib provided version of LO or the TDF download.
Comment 6 Alex Thurgood 2016-06-03 11:24:53 UTC
No info from OP for more than 6 months, setting as resolved insufficient data