PALATINELABSDocsENES

Pages

↑↓ to moveEnter to openEsc to close

Boolean package guide

Set, compare, flip and convert true/false values.

Version 2.17.1. Installed versions can differ. Examples are illustrative and not tested.

Jump to actions

Prerequisites

The actions run on the Device and need no other application or session. result → x means: save the output in variable x.

Type true or false in lowercase, or use a Boolean variable such as $flag$. TRUE, 1 and yes do not work. Convert a String or Number variable first, also a String that contains true. An empty Boolean field means false. All fields are optional. A value you type must be the correct type, also in a field the action does not use.

A small flow: set Boolean variable ready with Assign (source=constant, userDefined=true). Use $ready$ in Boolean condition with operator=EQ and value=true to take the true branch. Use To string when another action needs the text true.

Boolean inputs

IDEditor fieldType; defaultUse
sourceSelect the first boolean variable / Select boolean variable / Select the boolean variable to be invertedBooleandefault falseFirst or only Boolean.
checkSourceSelect the second boolean variableBooleandefault falseSecond Boolean.

Actions

Assign (booleanAssign)

Copy the selected Boolean constant or value.

Inputs

IDEditor fieldType; defaultUse
sourceSelect the source boolean variable/ valueSourcedefault constantconstant uses userDefined⁠; variable uses boolVar⁠.
userDefineduserDefinedBooleandefault falseA true/false switch. Used when source=constant⁠.
boolVarboolVarBooleandefault falseA Boolean value or variable. Used when source=variable⁠.

Outputs

IDTypeMeaning
resultBooleanSelected Boolean value.

Example

Prepare Boolean variable flag with false. Set source=constant, userDefined=true, and boolVar=$flag$. result → assigned.

Expected result

assigned is true. Change only source to variable and it is false. The field you did not pick is ignored.

Back to actions

Compare to (booleanCompareTo)

Order two Booleans: false is less than true. The result is a Number.

Inputs

Uses the Boolean inputs: source, checkSource.

Outputs

IDTypeMeaning
resultNumber1 if the first is true and the second is false, -1 for the reverse, 0 if equal.

Example

Set source=true and checkSource=false. result → comparison.

Expected result

comparison is 1.

Back to actions

Equal to (booleanEqualTo)

Save whether two Boolean values are equal.

Inputs

Uses the Boolean inputs: source, checkSource.

Outputs

IDTypeMeaning
resultBooleanTrue for equal inputs and false for different inputs.

Example

Set source=true and checkSource=true. result → same.

Expected result

same is true. Two false inputs also give true. One true input and one false input give false.

Back to actions

Invert (booleanInvert)

Return the opposite Boolean. The source changes only if you save the output back to it.

Inputs

Uses the Boolean inputs: source.

Outputs

IDTypeMeaning
resultBooleanLogical inverse of the input.

Example

Prepare Boolean variable flag with true. Set source=$flag$. Save result as another Boolean variable opposite.

Expected result

opposite is false and flag stays true. A false source returns true.

Back to actions

To number (booleanToNumber)

Convert a Boolean to 1 or 0 for a numeric field or calculation.

Inputs

Uses the Boolean inputs: source.

Outputs

IDTypeMeaning
resultNumberNumber 1 for true or 0 for false.

Example

Set source=true. result → numericFlag.

Expected result

numericFlag is 1. With source=false, it is 0.

Back to actions

To string (booleanToString)

Convert a Boolean to lowercase text for a text field or String template.

Inputs

Uses the Boolean inputs: source.

Outputs

IDTypeMeaning
resultStringString true or false⁠.

Example

Set source=false. result → flagText.

Expected result

flagText contains the String false. With source=true, it contains the String true.

Back to actions

Conditions

Boolean condition (booleanCondition)

Compare two Boolean values in an If step. Both sides accept Boolean variables.

Inputs

IDEditor fieldType; defaultUse
variableBoolean variableBooleandefault falseBoolean value.
operatorOperatorOperatordefault EQEQ (Equals to (=)) tests equality. NEQ (Not equal to (≠)) tests inequality.
valueValueBooleandefault falseSecond Boolean, such as $other$⁠, true or false⁠.

Outputs

No outputs. Use it in an If step.

Example

Prepare Boolean variables flag=true and other=true. Set variable=$flag$, operator=EQ (Equals to (=)), and value=$other$.

Expected result

The condition evaluates to true. Change operator to NEQ and it evaluates to false. With variable=$flag$, operator=NEQ, and typed value=false, it evaluates to true.

Back to conditions