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:
- In the Logic Block Designer, select the logic block by clicking its name in the left panel.
- In the Logic Block Designer's main panel, click the + buttons to add conditional blocks or actions to the executable logic.
Conditional blocks are decision-making operators that allow selective execution of logic or a choice between alternate execution paths based on whether a condition is true or false. Conditional blocks contain three operands: IF, THEN, and ELSE:
| Operand | Description |
|---|---|
| IF |
This is the condition, an expression that evaluates to either true or false based on the values of various form fields. Click + inside the IF node and use the point-and-click interface to define your expression. In its simplest form, the IF condition is based on a single form field evaluation (e.g.: Name is not blank). The available operators depend on the data type of the form field: generic operators such as is blank or is not blank, text specific operators such as starts with or contains, date specific operators such as years since or days until anniversary, etc. You can also create complex boolean logic by grouping conditions hierarchically with logical operators:
|
| THEN |
This is the execution path taken when the IF condition evaluates to true. Click + inside the THEN node and use the point-and-click interface to define this path. You can include a sequence of Data Actions, Field Actions, Logic Actions, Navigation Actions, UI Actions, or even other conditional blocks to create complex, nested decision trees. |
| ELSE |
This is the execution path taken when the IF condition evaluates to false. Click + inside the ELSE node and use the point-and-click interface to define this path. You can include a sequence of Data Actions, Field Actions, Logic Actions, Navigation Actions, UI Actions, or even other conditional blocks to create complex, nested decision trees. |
Data actions synchronize the user interface with the data store, either by refreshing the form's state from the database or by committing the current form data to the database.
| Data Action | Description |
|---|---|
| Refresh Grid | Refreshes a relation UI component by querying the database. For more information, see Add relations to the UI. |
| Refresh Business Status | Retrieves the form record's business status from the database. For more information, see Business Workflows. |
| Refresh Form Data | Reloads the full form state from the database, including attribute fields, header items, form grids, and business status. |
| Save Data | Saves the form data to the database, ensuring all changes are committed. |
Field actions allow you to control the value and properties of form fields.
| Field Action | Description |
|---|---|
| Set Value | Assigns a given value to a form field. |
| Set Empty | Clears the content of a form field, leaving it blank. |
| Set Visibility | Shows or hides a form field. Set to true to make the field visible, set to false to hide it. |
| Set Editable | Makes a field editable or read-only. Set to true to allow editing, set to false to make it read-only. |
| Set Required Level | Sets the mandatory status of a form field:
|
Logic actions allow you to trigger action handlers for state transitions, calling endpoints, generating reports, or client-side app logic.
| Logic Action | Description |
|---|---|
| Change Business Status | Transitions the form record to the specified business status. For more information, see Business Workflows. |
| Execute Endpoint | Calls a specific endpoint (see Endpoints). If the endpoint has predefined input parameters or output structure, an I/O Parameters field is displayed, allowing you map form attributes to specific inputs or outputs. |
| Generate Report | Generates a report (see Analytics). The report must have an Entity scope set to the form's main entity. |
| Call UI Logic Method | Calls a public method defined in the form's UI logic (see Code Execution Sequence). E.g.: Copy |
| Call Presenter Method | Calls a public method defined in the form's Presenter section (see Code Execution Sequence). E.g.: Copy |
Navigation actions allow you to refresh the current page or redirect the user to a different destination within the platform.
Navigation actions are final actions. You cannot insert additional actions or conditional blocks in the executable logic after a navigation action.
| Navigation Action | Description |
|---|---|
| Reload Page | Reloads the current page. |
| Navigate to Dashboard | Navigates to a specified dashboard (see Dashboards). |
| Navigate to Record | Opens a record referenced by the current form record in a specified form. |
| Navigate to List | Opens a specified entity view (see Data Views). |
| Navigate Home | Navigates to the FintechOS Portal homepage. |
| Navigate to Custom Flow | Navigates to a specified custom flow (see Custom Flows). |
UI Actions allow you to manipulate the user interface or control UI behavior by showing or hiding loading screens, enabling or disabling user interactions, and displaying messages.
| UI Action | Description |
|---|---|
| Loading Panel | Shows or hides the loading screen animation. |
| Remove Edit Button | Removes the Edit button for an option set or lookup attribute field. This allows users to only select preexisting values and prevents them from editing the option set or the related entity of the lookup attribute. |
| Set Step Read Only | Changes the read-only status of all attributes on the form step:
|
| Show Message | Displays one of the following message types:
|
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:
- In the Logic Block Designer, select the logic block by clicking its name in the left panel.
- Click the gear icon in the top-right corner of the Logic Block Designer to open the right panel.
- 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:
- In the Logic Block Designer, select the logic block by clicking its name in the left panel.
- Click the gear icon in the top-right corner of the Logic Block Designer to open the right panel.
- 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:
- In the Logic Block Designer, click the gear icon in the top-right corner to open the right panel.
- Select the Triggers & Blocks tab to view all triggers configured for the form step, along with their associated logic blocks.