The Logic template appears in the template list when a Boolean field, of type boolean, has been picked in the Transform pane. It allows performing basic Boolean logic operations on boolean fields.
Logic |
Save the boolean result of the given Boolean into the specified boolean Result destination. Choosing the and, or, or xor operator will open a Value parameter box allowing choice of another boolean field, a specified boolean value, or an expression that evaluates to a boolean value.
Launch the template by choosing a boolean field and then double-clicking the Logic template. When the template launches we can specify options.
|
Logic : and |
Perform a logical AND operation between the source field and the specified field, value, or expression result, and save into the specified Result destination.
We start with a table with two fields of type boolean. We have used the Layers pane to hide the mfd_id field, for a simpler illustration.
With the focus on the table window, in the Transform pane we choose the Boolean A field and then the Logic template.
In the Logic template, we choose and as the Operation.
From the pull down menu in the Value box we choose the Boolean B field. If we like, we could choose Value and enter TRUE or FALSE for a specified Boolean value, or we could choose Expression and write an SQL expression that evaluates to true or false.
For the Result destination, we choose New Field and then enter Logical AND as the name of the new field to add to the table. We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be. We leave the Result type at the default float64.
If we preferred, we could have chosen Same Field to write the result back to the Boolean A field, updating it "in place," or we could have chosen some other existing numeric field in the table.
Press Transform.
The template creates a new float64 type field called Logical AND and populates it with the result of a logical AND operation between the Boolean A field and the Boolean B field.
|
Logic : not |
Perform a logical NOT operation on the source field, and save into the specified Result destination.
We start with a table with one field of type boolean. We have used the Layers pane to hide the mfd_id field, for a simpler illustration.
With the focus on the table window, in the Transform pane we choose the Boolean A field and then the Logic template.
In the Logic template, we choose not as the Operation.
For the Result destination, we choose New Field and then enter Logical NOT as the name of the new field to add to the table. We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be. We leave the Result type at the default float64.
If we preferred, we could have chosen Same Field to write the result back to the Boolean A field, updating it "in place," or we could have chosen some other existing numeric field in the table.
Press Transform.
The template creates a new float64 type field called Logical NOT and populates it with the result of a logical NOT operation on the Boolean A field.
|
Logic : or |
Perform a logical OR operation between the source field and the specified field, value, or expression result, and save into the specified Result destination.
We start with a table with two fields of type boolean. We have used the Layers pane to hide the mfd_id field, for a simpler illustration.
With the focus on the table window, in the Transform pane we choose the Boolean A field and then the Logic template.
In the Logic template, we choose or as the Operation.
From the pull down menu in the Value box we choose the Boolean B field. If we like, we could choose Value and enter TRUE or FALSE for a specified Boolean value, or we could choose Expression and write an SQL expression that evaluates to true or false.
For the Result destination, we choose New Field and then enter Logical OR as the name of the new field to add to the table. We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be. We leave the Result type at the default float64.
If we preferred, we could have chosen Same Field to write the result back to the Boolean A field, updating it "in place," or we could have chosen some other existing numeric field in the table.
Press Transform.
The template creates a new float64 type field called Logical OR and populates it with the result of a logical OR operation between the Boolean A field and the Boolean B field.
|
Logic : xor |
Perform a logical XOR operation between the source field and the specified field, value, or expression result, and save into the specified Result destination.
We start with a table with two fields of type boolean. We have used the Layers pane to hide the mfd_id field, for a simpler illustration.
With the focus on the table window, in the Transform pane we choose the Boolean A field and then the Logic template.
In the Logic template, we choose xor as the Operation.
From the pull down menu in the Value box we choose the Boolean B field. If we like, we could choose Value and enter TRUE or FALSE for a specified Boolean value, or we could choose Expression and write an SQL expression that evaluates to true or false.
For the Result destination, we choose New Field and then enter Logical XOR as the name of the new field to add to the table. We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be. We leave the Result type at the default float64.
If we preferred, we could have chosen Same Field to write the result back to the Boolean A field, updating it "in place," or we could have chosen some other existing numeric field in the table.
Press Transform.
The template creates a new float64 type field called Logical XOR and populates it with the result of a logical XOR operation between the Boolean A field and the Boolean B field.
|
Transform - Boolean: Expression