Button Actions
In Lowgile, buttons can trigger actions that run scripts or perform defined behaviors.
There are two main types of button actions, depending on where the action logic is defined and how it’s reused.
1. Ad-hoc Actions
Section titled “1. Ad-hoc Actions”Ad-hoc actions are specific to a single button.
The action script is defined directly within the button’s Properties panel under its Action settings.
These are the most common type of button actions in Lowgile — ideal for simple, one-off interactions such as saving a record, navigating to another screen, or executing a short script.
2. Centrally Managed Actions
Section titled “2. Centrally Managed Actions”Centrally managed actions are reusable actions that can be triggered from multiple places within a screen.
Instead of defining the script in an individual button’s properties, these actions are created and managed in the screen’s Actions tab.
This approach helps maintain cleaner, modular logic — especially in complex screens where multiple buttons need to trigger the same action or workflow.
| Criteria | Ad-hoc Actions | Centrally Managed Actions |
|---|---|---|
| Definition Location | Defined directly in the button’s Properties panel | Defined in the screen’s Actions tab |
| Reusability | Used by a single button only | Can be triggered by multiple buttons or components |
| Use Case | Simple, one-time actions (e.g., save, cancel, navigate) | Shared or complex actions reused across multiple triggers |
| Maintainability | Easier for small screens | Easier to manage in larger apps with repeated logic |
| Example | Save button runs a short validation script | “Submit Request” action reused by multiple screens |
Best Practice
Use ad-hoc actions for simple, localized behaviors.
Use centrally managed actions when multiple buttons or components need to share the same logic.