Logic Blocks

Logic blocks allow you to configure event handlers through an intuitive no-code interface. You can define complex actions and conditional logic that can be triggered by attribute field updates, custom events, or at different stages of a step's execution sequence. Logic block are supported in both Form Driven Flows and App Data Forms steps.

Add, Rename, Find, and Delete Logic Blocks

To manage logic blocks, open the form driven flow or app data form step where you wish to configure event handlers, then select the Logic Blocks Designer tab. Use the panel on the left to:

  • Create a logic block: Click + Add New Logic Block at the bottom of the panel.
  • Rename a logic block: Click the logic block's name to select it, then type to overwrite the existing name.
  • Find a logic block: Use the Search logic block field at the top of the panel to enter search keywords.
  • Delete a logic block: Hover over the logic block's name and click the trashcan icon that appears next to it.

Configure a Logic Block's Executable Logic

The executable logic defines the actions or computations that the logic block performs when its trigger conditions are met (see Configure a Logic Block's Trigger(s)). To add executable logic to a logic block:

  1. In the Logic Block Designer, select the logic block by clicking its name in the left panel.
  2. In the Logic Block Designer's main panel, click the + buttons to add conditional blocks or actions to the executable logic.

Configure a Logic Block's Trigger(s)

A trigger is an event that causes a logic block’s executable logic to run. You can configure multiple triggers for each logic block.

To configure a trigger:

  1. In the Logic Block Designer, select the logic block by clicking its name in the left panel.
  2. Click the gear icon in the top-right corner of the Logic Block Designer to open the right panel.
  3. Fill in the sections in the Triggers & Functionality tab:
    • Functionality: Optionally enter a description of the logic block's triggers and executable logic.
    • Triggers - Data Change: Click +Add Data Change Trigger to run the executable logic when a specific form field is updated.
    • Triggers - On Event: Click +Add On Event Trigger run the executable logic based on one of the following events:
      • After Data Refresh - Any time form state is loaded from the database.
      • On Step Enter - Each time the step is displayed, after the step's user interface is rendered.
      • Before Save - Before the form data is saved to the database (e.g.: when clicking Next or Finish, but not when clicking Previous).
      • Custom Event - A custom event defined using the formData.registerEvent Client SDK method.

Preview the Logic Block's Code

The code underlying each logic block is generated automatically as you configure the block from the point-and-click interface. To view this code:

  1. In the Logic Block Designer, select the logic block by clicking its name in the left panel.
  2. Click the gear icon in the top-right corner of the Logic Block Designer to open the right panel.
  3. Select the Code Preview tab to display the generated code.

Review the Logic Block Triggers

To review the step's logic blocks grouped by their triggers:

  1. In the Logic Block Designer, click the gear icon in the top-right corner to open the right panel.
  2. Select the Triggers & Blocks tab to view all triggers configured for the form step, along with their associated logic blocks.