Skip to main content

Conditional Logic

Conditional Logic lets you create When > Then rules that show or hide tasks, headings, whole groups of tasks and the content controls within your tasks.

You can use these rules to create dynamic workflows that respond to the answers people give as they work through a checklist.

Example Use Cases​

  • You have an Employee Onboarding process. Some tasks only apply to IT employees and others only to Marketing. Put each department's tasks under their own heading and add a rule that shows the whole group when that department is chosen in the Department drop down.
  • You have a Customer Setup process with a multi-choice control listing the products the customer has bought. When "Web Hosting" is selected, a drop down asking for a "Tier" is shown within the same task.
  • You have a Purchase Request process. A director's approval task is shown only when the amount is greater than 5,000 and the request type is Hardware or Software.

How a Rule Works​

A rule has two parts: the conditions (When) and the action (Then).

When is one or more conditions, each testing the answer in a control. A rule can test several controls, on any tasks, and you choose whether all of the conditions have to be true or any one of them.

Then shows or hides one or more tasks, headings, whole groups and content controls.

A rule applies while its conditions are true. When they stop being true, because an answer is changed or cleared, everything the rule showed or hid goes back to how it started. You do not need a second rule to undo the first.

Using the Employee Onboarding example:

What a Condition Can Test​

Conditions can test the answers in these content controls:

  • Drop Down
  • Multi Choice
  • Short Text
  • Long Text
  • Website
  • Email
  • Date
  • Number
  • Members

The tests on offer depend on the control:

ControlTests
Short Text, Long Text, Email, Websiteis, is not, contains, does not contain, starts with, ends with, has no value, has any value
Drop Downis, is not, is any of, is none of, has no value, has any value
Multi Choice, Membersis, is not, is any of, is none of, includes all of, has no value, has any value
Numberis, is not, is greater than, is greater than or equal to, is less than, is less than or equal to, is between, is not between, is out of range, is in range, has no value, has any value
Dateis, is not, is after, is on or after, is before, is on or before, is between, is not between, is today, is before today, is after today, is within the next (days), is within the last (days), has no value, has any value
  • The text tests ignore capital letters, so "urgent" matches "URGENT".
  • is between includes both ends.
  • The tests against today use the checklist's time zone. They are worked out when an answer the rule reads is changed, not as the days pass.
  • A Number or Date can be compared with another field instead of a fixed value: choose another field beside the test, then pick a control of the same type. For example, show a task when Actual cost is greater than Budget.

Creating a Rule​

Rules are created in your Template. We recommend building as much of your process as possible first. At a minimum you need the control a rule will test and the tasks, headings and controls it will show or hide.

  1. Open your template and click the Logic button at the top of the designer. It shows how many rules the template has.
  2. Click Add rule.
  3. Under When, select the field to test, then the test, then the value. Click Add condition to test something else as well, and choose All or Any to say how the conditions are put together.
  4. Under Then, choose Show or Hide, then click Choose tasks, fields or groups and tick what the rule affects.
  5. Optionally give the rule a name, so it is easy to find later.
  6. Click Done, then save the template. Rules are stored when the template is saved.

You can also open the panel from a task: click the Conditional Logic button at the top of the task's content area. The panel then opens on This task, listing the rules that read or affect that task. Switch to All rules to see every rule in the template.

What Starts Hidden​

You do not set this yourself. When you click Done, everything a rule shows is set to start hidden, and everything a rule only hides is set to start visible. The Otherwise line on each rule says what its targets go back to.

All, Any and Groups​

With more than one condition, choose All of these are true or Any of these are true.

To mix the two, click Add group. A group is a set of conditions with its own All or Any, and it counts as one condition in the rule. For example: Amount is greater than 5,000 and (Supplier has no value or Delivery date is within the next 7 days).

Showing or Hiding a Whole Group​

A heading and the tasks under it, up to the next heading, are a group. When you choose what a rule affects, tick whole group beside a heading to show or hide the heading and every task under it together. Tasks you add under that heading later are included automatically.

A rule cannot show or hide a control it tests, or the task that control is on.

The Order of Rules​

Rules run from top to bottom. When two rules that are both true disagree about the same task or control, the later rule wins. Use the up and down arrows on a rule to move it.

Several rules can show the same task. It is shown while any one of them is true.

Turning a Rule Off​

Untick On to keep a rule without it doing anything. You can also duplicate a rule, or delete it, from the icons beside its name.

To see every rule in the template at once, with lines from each control to what it shows or hides, open the Workflow Map from the Settings menu.

Controls Linked to a Data Set​

Conditional logic works on Drop-Down and Multi-Choice controls that are linked to a Data Set exactly as it does on controls with a hand-typed list.

When you build a rule, the value list is filled from the linked View's records, using the field the control displays.

Rules are stored against the record rather than the text on screen, so a rule keeps working if the record is later renamed, or if the link is changed to display a different field.

note

If the linked Data Set or View has been deleted, the value list will be empty. The Template Designer shows a warning banner explaining which links need attention.

Rules on a Number Control​

A Number control compares its reading as a number. As well as the comparisons and is between, it offers two tests no other control has:

  • is out of range: the reading is below the control's Minimum or above its Maximum.
  • is in range: there is a reading, and it is within those limits.

These two take no value: they read the limits set on the control itself, so changing a limit in the template changes what the rule means. Type any other test's value with a point or a comma for the decimal mark.

An out-of-range reading is flagged in the checklist but never stops the task being completed. To make it matter, add a rule that shows a corrective-action task, or a halt task, when the reading is out of range.

Conditional Logic In Action​

In this example an Employee Onboarding checklist has rules that show and hide tasks and controls depending on the value chosen in the 'Department' drop down control.

When the 'IT' department is selected a second drop down is shown prompting the user to select an 'IT Function'. In addition, the task 'Create IT specific accounts' is shown.

When we select 'Marketing' the previous task and the 'IT Function' drop down are hidden and the task 'Create Marketing specific accounts' is shown.

When we select 'HR' both of the department specific tasks are hidden.

Where a Rule Applies​

A rule is worked out wherever the answer it reads is given: on the checklist page, in the Tasks grid side panel or through the API. Rules are also worked out when a checklist is created.

Whichever it is, the outcome reaches everybody looking at that checklist. Tasks and controls appear and disappear on other people's checklist pages and in their Tasks grids without a reload, and a task a rule has just revealed is notified to its assignees, the same way a task assigned by hand is.

A hidden task is not listed on the Tasks grid at all. Reveal it and it arrives in the grids it belongs in; hide it again and it leaves them.

Classic Rules​

Templates created before the current rules were introduced may have classic rules. They keep working exactly as they always have, and you can carry on using them.

A classic rule belongs to the task holding the one control it tests, and it works differently: it runs only at the moment that control's answer changes, and nothing goes back by itself. That is why classic rules come in pairs, with a second rule to reverse the first.

  • To edit them, select the task and click its Conditional Logic button, then Edit the classic rules on that task. The 'Classic rules' popup lets you change and remove the task's existing rules, and choose what starts hidden. New classic rules cannot be added: new logic is added as a rule from Logic.
  • A task or control a classic rule shows or hides cannot also be given to a new rule. Convert the classic rules first.

Converting Classic Rules​

The Conditional Logic panel shows a note when a template has classic rules, with a Convert to rules button.

  1. Click Convert to rules. A preview shows the rules that will be created, and nothing is changed yet.
  2. Check the preview. The rules that only reversed other rules are left out, because a rule reverses by itself. The preview also lists any classic rules that will be left as they are, with the reason.
  3. Click the Convert button, then Done, then save the template.

Two things to know before converting:

  • Clearing an answer. If no classic rule tested for an empty answer, clearing the answer used to leave things as they were. After converting, they go back to how they start. The preview names the controls this applies to.
  • Some classic rules cannot be converted and are left as they are: for example where two different controls show and hide the same task, or where some answers leave a task as the previous answer left it.

Checklists already running keep the rules of the template version they are on until they are upgraded.

  • Control Types: which controls a rule can test, and which can be hidden by one.
  • Dropdown Control: the most common control to test.
  • Enforce Task Order: the other way to control which task comes next.
  • Workflow Map: every rule in the template drawn as a diagram, and which have fired on a checklist.
  • The Tasks Grid: where a rule's outcome shows up outside the checklist itself.