6 - Conditional Settings

Conditional settings behave differently depending on the conditions you give them. You can spot conditional settings by their grey border.

Each condition can have 3 parts

  1. A type
  2. A set of key-value pairs (see “Pairs and Connectors” below)
  3. An output.

Different condition types have different combinations of these parts.

Types

There are four types of conditional fields. For each conditional field, you typically can only select one or two types.

Conditional (“If”)

If the key-value pair match, the “output” is the setting value.

Assignment (“Set”)

Set the setting value directly.

Association (“Map”)

Set the setting value with a list of key-value pairs.

Validation (“Ensure”)

The setting is determined by whether the key value pairs match

Chaining

Conditions

Some conditional fields allow for multiple conditions. In most cases these inputs are alternatives (they are joined by “or”). The conditions are checked in the order they appear (top down).

In a couple of cases the inputs are cumulative (they are joined by “and”), meaning that the setting is determined by whether all conditions pass.

Pairs

You can also chain pairs within a condition. At the moment, the only type of pair chaining you can do is cumulative, i.e. all pairs must pass for the condition to be met and the output applied.

Input Types

There are 8 input types, which appear in different configurations, depending on the setting.

  • Text: A text input
  • List: A list of text inputs
  • Wizard Field: Another field from the wizard
  • User Field: A user field of the user using the wizard
  • Group: A group or list of groups
  • Category: A category or list of categories
  • Tag: A tag or list of tags
  • User: A user or list of users

Pairs and Connectors

A key value pair is two inputs that are compared or associated using a “connector”. The connector is how the key is compared (or associated) with the value. Not all connectors are available for all condition types, but here is the full list:

  • = (equal). The key must match the value exactly.
  • > (greater than). The value is cast to an integer if the key is an integer.
  • < (less than). The value is cast to an integer if the key is an integer.
  • >= (greater or equal). The value is cast to an integer if the key is an integer.
  • <= (less or equal). The value is cast to an integer if the key is an integer.
  • =~ (regex match). The value is treated as a regex input (ruby based).
  • → (association). Used for association inputs (see above).
  • is (comparison). This supports these values:
    • true. Checks if key is true
    • false. Checks if key is false
    • present. Checks if key is present (i.e. not empty)

I’m helping new users on a private forum introduce themselves through a survey. They answer some questions - some required, some not. I have a “Create Topic” action and I’m using the post builder to take all their answers and put them into a new topic.

See below:

Screen Shot 2021-02-04 at 6.22.34 PM

The problem I’m trying to solve is not all the questions are answered. What I’d like to do is have a conditional inside the builder that checks if an answer is present. If so, it will display the question and the answer.

Is this possible?

We’d find that helpful too! My guess is that it would be very tricky to implement though.

Hey guys!

What would be the “easiest” way to use a condition in order to hide a field without having to remove it from the wizard? In my case I tried ensure “Username” is “present”, but the field is still displayed.

UPDATE: Found a solution! I used the following condition if anyone wants to hide the field from all users (including admins):

Screenshot 2022-08-29 at 11.53.33

Glad you found a solution!

Just a note that all users will always have a username which is why that won’t work as a condition.