The Logic Designer
The logic designer provides functionality to build complex boolean logic used to either toggle the display of an element or to override an element’s attribute value under certain conditions.
Boolean logic for AstraDoc is split into 2 main categories: Groups and Conditions.
Groups
Section titled “Groups”Groups, as per their name, allow you to group Conditions and other sub Groups in order to enforce the order of operations when evaluating a boolean expression. Groups must have at least one Group or Condition inside of it in order to be considered valid.
Within the logic designer, a Group panel has 2 main sections: Its property panel, containing the properties for the group as well as the actions drop down menu, and its child elements panel holding child groups and conditions.

Group Properties
Section titled “Group Properties”| Property | Description |
|---|---|
Label | The label for the group, useful for providing a text based description of what the group’s logic does. |
Type | The boolean operator type the group should apply when evaluating child groups and conditions. Defaults to And. |
Not | When enabled, will apply a Not operation to the end result of the group’s boolean expression, negating its final boolean result. i.e it will convert a true result to false and a false result to true |
Group Elements
Section titled “Group Elements”As stated previously, a group must have at least one sub Group or Condition to be considered valid. Sub groups and conditions can be added to a group using the actions menu in the right hand side of the group’s property panel:

You can use the group’s action menu to also delete a group, provided it isn’t the root group for the logic expression.
Boolean Operator Types
Section titled “Boolean Operator Types”When a group has multiple child elements, boolean operations will be applied to the result of these groups or conditions to determine a final boolean result for the group. You can read more about boolean operations here.
There are 2 main binary operators for groups: And and Or
The And operator will require all variables of the expression to be true for the operation itself to result in true. If any of the variables (child groups or conditions) within an And expression are false, the result of the And will also be false.
The Or operator will result in a true value if any of its variables are true. The only way for an Or operation to result in a false value is if all of its variables are also false.
The Not operator negates the result of the group’s final expression value. If the final result of the group is true, enabling the Not expression will invert the value to false and vice versa.
Conditions
Section titled “Conditions”Conditions provide the ability to return a true or false value based on either a comparison between two provided values (for Boolean Conditions) or (when evaluated within a Loop dynamic) whether in the index or position of the element in the Loop meets a certain criteria (for Index Conditions).
The action menu on the right hand side of a condition will provide the ability to delete the condition or move it to another group.
Boolean Conditions
Section titled “Boolean Conditions”Boolean conditions will produce a true or false result based on the comparison between a left hand side (LHS) value and a right hand side (RHS) value. Both the LHS and RHS parameters must contain a value for the condition to be considered valid.

Boolean Condition Properties
Section titled “Boolean Condition Properties”| Field | Description |
|---|---|
| LHS Parameter | The value of the left hand side parameter. |
| Condition Type | The type of comparison used when comparing the 2 values. |
| RHS Parameter | The value of the right hand side parameter. |
Available Comparison Types
Section titled “Available Comparison Types”| Type | Description |
|---|---|
| If Equal | Will return true only if the provided values are identical. |
| If not Equal | Will return true only if the provided values are not equal to each other. |
| If Greater | Will return true if the LHS value is greater than the RHS value. |
| If Less | Will return true if the LHS value is less than the RHS value. |
| If Greater or Equal | Will return true if the LHS value is greater than or equal to the RHS value. |
| If Less or Equal | Will return true if the LHS value is less than or equal to the RHS value. |
Index Conditions
Section titled “Index Conditions”Index conditions will produce a true or false result based on the position (the index) of an element within a Loop dynamic. These conditions do not have any parameters.

Available Condition Types
Section titled “Available Condition Types”| Type | Description |
|---|---|
| Item is First | Will return true if the item is the first item in the array. |
| Item is Last | Will return true if the item is the last item in the array. |
| Item Index is Even | Will return true if the index of the item is an even number. |
| Item Index is Odd | Will return true if the index of the item is an odd number. |