GREL Boolean Functions

jmk edited this page Apr 27, 2017 · 6 revisions

Boolean functions supported by OpenRefine Expression Language (GREL)

See also: All GREL functions.

and(boolean b1, boolean b2, ...etc)

Logically AND two or more booleans to yield a boolean. For example, and(1 < 3, 1 > 0) returns true because both conditions are true.

or(boolean b1, boolean b2, ...etc)

Logically OR two or more booleans to yield a boolean. For example, or(1 < 3, 1 > 7) returns true because at least one of the conditions (the first one) is true.

not(boolean b)

Logically NOT a boolean to yield another boolean. For example, not(1 > 7) returns true because 1 > 7 itself is false.

xor(boolean b1, boolean b2, ...etc)

Logically XOR (exclusive-or) two or more booleans to yield a boolean. For example, xor(1 < 3, 1 > 7) returns true because only one of the conditions (the first one) is true. xor(1 < 3, 1 < 7) returns false because more than one of the conditions is true.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.