Logical expression – conditions and comparisons¶
The logical expression compares values and combines the comparisons with And and Or. It returns yes or no and is the building block of every condition in nexxcite: visibility of blocks, conditions of commands, validations, the branches of a case expression.
1. At a glance¶
| Purpose | Evaluates a condition made of comparisons, groups and And/Or |
| Typical use | "Status is Closed", "Priority is High and (Category is Hardware or Network)" |
| Returns | Yes/no (true / false) |
| Related | Case (several outcomes), Queries (conditions on the records in the database) |
2. Settings¶
The editor shows the condition as a tree. The top level is a group; groups can contain clauses and further groups.
| Element | Settings |
|---|---|
| Group | "And" / "Or" – how the entries of the group are combined. The number at the left edge shows how many entries the group has. |
| Clause | Left side (the value being tested), operator, right side (the value it is compared with) |
| Button | Action |
|---|---|
| "Add clause" | Adds a comparison to the group |
| "Add group" | Adds a nested group – this is how brackets are written |
| Remove (minus icon) | Removes the clause or group |
| "Move" menu | "Move up", "Move down", "Move into group" (wraps the entry in a new group), "Move out of group" |
Both sides of a clause are expressions: a field, a fixed value, a variable, another expression. The
right side is hidden for the operators Empty and NotEmpty. A new clause starts with the
operator Equals.
Operators¶
| Operator | True when |
|---|---|
Equals |
Both sides are equal, ignoring upper and lower case |
EqualsCased |
Both sides are equal, including upper and lower case |
NotEquals |
The sides differ, ignoring case |
NotEqualsCased |
The sides differ, including case |
LessThan, LessThanOrEqual, GreaterThan, GreaterThanOrEqual |
Numerically when both sides are numbers, chronologically when both sides are dates, otherwise in text order (see section 5) |
Like |
The left side matches the pattern on the right, ignoring case (see below) |
NotLike |
The left side does not match the pattern |
Empty |
The left side is empty |
NotEmpty |
The left side has a value |
In |
The left side is one of the values in the list on the right, ignoring case |
NotIn |
The left side is none of the values in the list on the right |
3. Behaviour¶
- And: every entry of the group must be true. Or: one true entry is enough. Evaluation stops as soon as the result is certain, so later entries are not evaluated.
- Groups are brackets. "A and (B or C)" needs a group for "B or C". Without it, all three are combined with the same gate and the condition means something else.
- An empty group is true. A logical expression without any clause is always true.
- When a clause compares a yes/no value, the other side is converted to yes/no as well (
1andtruecount as yes).
Patterns for Like¶
| Character | Meaning |
|---|---|
* or % |
Any text, also none |
_ |
Exactly one character |
[abc], [a-c] |
One character from the set or range |
[^abc] |
One character not in the set |
The pattern must match the whole value. *error* means "contains error"; error alone only
matches the value "error".
Lists for In and NotIn¶
The right side of In and NotIn should return a JSON array, for example ["Open","New"] – as a
fixed value or as the result of an expression (the rules SplitStringJsonArray and the aggregation
Select return such lists).
- A right side that is not a JSON array counts as a list with that one value.
- An empty right side is an empty list:
Inis then false,NotIntrue.
Empty values¶
Empty is true for no value, an empty text, the empty id and a date of 1 January 1753 or earlier
(see Expressions – overview, section 5). To test for "no value", always use Empty
rather than comparing with an empty text.
4. Examples¶
Simple condition: "Status" Equals Closed.
With brackets: Group "And" with
- "Priority"
EqualsHigh - Group "Or" with "Category"
EqualsHardwareand "Category"EqualsNetwork
List: "Status" In ["Open","In progress","Waiting"].
Contains: "Subject" Like *printer* is true for "Printer broken" and "New printer needed".
5. Limitations¶
- Dates are compared as dates only when both sides are one: a date or date/time field, or a text
that reads as a date (
2026-10-20,2026-10-20 14:30,10/20/2026). A text that is no date – an empty value, a word – is compared as text. To compare a date with an empty field reliably, check the field withEmptyfirst. - Text order (for
LessThanand similar on text) follows a simple character order; it is not meant for sorting names in a language-specific way.