Skip to content

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, 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.

A logic group

PropertyDescription
LabelThe label for the group, useful for providing a text based description of what the group’s logic does.
TypeThe boolean operator type the group should apply when evaluating child groups and conditions. Defaults to And.
NotWhen 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

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:

Adding elements to a group

You can use the group’s action menu to also delete a group, provided it isn’t the root group for the logic expression.

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 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 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

FieldDescription
​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.
TypeDescription
​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 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.

Index condition

TypeDescription
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.​