Skip to content

MenuState (User-Defined Configuration Example)

MenuState is a specific implementation of a User-Defined Configuration used to store lightweight UI state.
In the Purchasing Application example, it tracks whether the sidebar menu is collapsed or expanded, allowing the interface to remember the user’s preference across screens.

This page expands on how MenuState works in practice and how it interacts with screens and actions.


To create the configuration:

  1. Open DesignUserDefinedConfiguration
  2. Click +
  3. Name the configuration MenuState
  4. Click OK — no fields need to be defined

Lowgile creates the configuration and makes it available throughout the application.


MenuState begins empty. When screens or actions reference a value, Lowgile automatically creates it.

For example:

This.MenuState.sidebarOpen = true

Even though sidebarOpen isn’t defined anywhere, Lowgile creates it dynamically.

This enables a schema-free workflow where UI state evolves naturally as you build the UI.

A common pattern is toggling the sidebar from a button:

This.MenuState.sidebarOpen = !This.MenuState.sidebarOpen

If sidebarOpen does not yet exist, Lowgile creates it and stores the new value.

A screen, component, or layout can read the value:

Visible: This.MenuState.sidebarOpen

This allows UI elements to respond directly to user preferences.

MenuState can drive presentation logic, such as dynamic layout sizes:

Pane.Width = This.MenuState.sidebarOpen ? 260 : 80

This creates adaptive UI behavior without workflow variables, entities, or additional logic.

MenuState demonstrates how User-Defined Configurations provide:

  • Dynamic, global storage
  • Schema-free UI state
  • Automatic value creation
  • Cross-screen accessibility
  • Simple integration with actions and expressions