Boolean Fields in the SchoolFi Database & the ReportWriter
Boolean fields are "true/false" fields. Technically, they can have 3 values: true, false and empty which means "not set".
Boolean fields are identified by the word "Boolean" in table schema:
However, in the ReportWriter, these fields are actually silently converted to Strings (text values) and have two settings:
Y when true and empty when false.
In Expression Language they cannot be used as true boolean values: Expression Language has 'boolean constants': the word true is treated as Boolean true (it's used like a number. 1 is 1, true means true). The word false is the Boolean constant for 'false'. THIS DOES NOT WORK FOR BOOLEAN VALUES IN THE SCHOOLFI ReportWriter.
Testing Boolean Fields for True and False in Expressions
In Expression Language in the ReportWriter you must test the Boolean fields against the Strings Y and '' (or empty).
To test for "true" compare your Boolean field with the String 'Y':
${ row.flagCounselor == 'Y' ? "COUNSELOR" : "NOT A COUNSELOR"}
To test for 'false' compare your Boolean field with "not Y":
${ row.flagCounselor != 'Y' ? "NOT A COUNSELOR" : "COUNSELOR"}
Doing a straight Boolean compare does not work:
${ row.flagCounselor == true ? "COUNSLEOR" : "OOPS"} --> will always result in "OOPS".
${ row.flagCounselor ? "TRUE" : "FALSE" } --> will also always result in "FALSE"
Booleans in the SchoolFi ReportWriter are not true Booleans and cannot be used as true Booleans.
Boolean Fields in Filters
In Filters (on the Filters screen) and in links for LookUp Columns, the same thing applies: Test using 'Y' and "not Y":
flagCounsler == Y
and
flagCounselor != Y
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article