User-Defined Configurations
User-defined configurations are lightweight, global objects that allow your application to store UI state, preferences, flags, and temporary values that do not belong in an entity, screen, or workflow.
They contain no layouts, no fields you must define, and almost no logic. Instead, they behave as simple containers that Lowgile automatically reads from or writes to during screen interactions, expressions, or actions.
Common use cases include:
- remembering whether a sidebar menu is expanded or collapsed
- storing UI preferences such as selected tabs or toggles
- tracking lightweight client-side state
- sharing temporary values across screens
When to Use a User-Defined Configuration
Section titled “When to Use a User-Defined Configuration”Use a User-Defined Configuration when the information:
- does not represent business data
- does not belong in the database
- must be available across screens
- is related to UI behavior or user interaction
- should be stored with zero configuration and no schema definition
They are ideal for values that behave like global variables, but with managed access inside Lowgile’s expression system.
Creating a User-Defined Configuration
Section titled “Creating a User-Defined Configuration”To create one:
- Open the Design area.
- Select UserDefinedConfiguration from the Object types panel.
- Click + and enter a name (e.g.,
MenuState). - Click OK—no additional setup is required.
Lowgile registers the configuration globally and allows it to store fields dynamically as soon as your screens or actions reference them.
Dynamic Fields (Created Automatically)
Section titled “Dynamic Fields (Created Automatically)”User-defined configurations start empty. But Lowgile automatically creates fields the first time they are used, for example:
This.MenuState.sidebarOpen = trueEven though sidebarOpen was never defined manually, Lowgile creates it on the fly and stores the value.
This dynamic, schema-free approach makes User-Defined Configurations perfect for lightweight UI state.
Example Usage
Section titled “Example Usage”A typical example is the MenuState configuration, which stores whether the sidebar is open or collapsed.