(Deprecated) Budibase Docs
  • đź‘‹Introduction
  • Quickstart tutorials
    • Build a CRUD app
      • Importing the Vehicles table from a CSV
      • Creating the Service log table from scratch
      • Listing recent Service Logs on the home screen
      • Creating a new Service Log with a modal
    • Build a CRUD app- SQL
      • Connecting to your SQL tables
      • Creating Screens from your SQL tables
      • Using relationships between SQL tables
      • Creating a List screen from scratch, using a SQL table
      • Creating a new log, with a modal
    • Build a CRUD app - REST
      • Adding a REST datasource
      • Creating a query that Lists Issues
      • Using your request to display items in your app
      • Add a “Create Item” request
      • Create a new todo Item, inline
      • Mark todo items as “Done”
      • Finishing Touches
  • Building apps
    • Data
      • Users table
      • Data sources
        • Internal/CSV
        • PostgreSQL and MySQL
        • REST
          • REST Queries
          • REST Bindings Example
          • REST Query Import
          • REST Authentication
          • REST Variables
        • Other sources
      • Data Types
        • Text
        • Number
        • True/False (Boolean)
        • Date/time
        • Options
        • Attachments
          • Example
        • Relationships
          • Example
        • Formula
        • JSON
      • Views
        • Filters
        • Calculations
        • Groups
      • Transformers
    • Design
      • Screens
      • Layouts
      • Components
        • Section
        • Container
        • Data Provider
        • Repeater
        • Table
        • Chart
        • Card
        • Text
        • Button
        • Link
        • Icon
        • Image
        • Embed
      • Forms
        • Form Component
        • Field Groups
        • Fields
      • Bindings
      • Actions
      • App State
      • Conditions
      • App theming (coming soon)
      • Handling Data
        • Search/Filter Data
    • Automate
      • Automation steps
        • Triggers
        • Logic
        • Actions
      • Activating and testing
      • Contextual bindings
    • Admin and management
      • User Management
      • Authentication and SSO
        • OpenID Connect
        • SSO with Auth0
        • SSO with Azure AD
        • SSO with Okta
        • SSO with OneLogin
        • SSO with Google
        • SSO with Keycloak
      • Email
      • Portal
      • User Settings
  • Guides
    • Display user-related data
    • Add search
    • Add filtering
    • Create public & private screens
    • Writing a custom SQL query
    • Create a child record from the parent
    • Items assigned to me
    • Master-detail
  • Self-hosting
    • Get started
      • Budibase CLI Setup
    • Hosting methods
      • Overview
      • DigitalOcean
      • Kubernetes (K8S)
      • Docker compose
    • Hosting settings
      • Advanced options
        • Reverse proxy
    • Accessing CouchDB
    • Accessing MinIO
  • References
    • Budibase architecture
    • Deployment information
    • Troubleshooting
    • Contributing to Budibase
      • Writing Your Own External Data Connectors
Powered by GitBook
On this page
  • Persisting values
  • Deleting values
  • Referencing state values
Export as PDF
  1. Building apps
  2. Design

App State

Set arbitrary values in your app to handle common use-cases like having a toggle to show or hide a component

PreviousActionsNextConditions

Last updated 3 years ago

App state is a generic store of values that can be used to easily pass values around and persist them between navigation and page reloading.

Unlike other bindable values, App state values can be set and used anywhere in your application. Nesting is not required. To set an app state value you can use a new action called Set Value in the actions drawer. There are two types; Setting or Deleting a value. When selecting a key the combobox will show all the existing app state values across your application. If you want to add a new one you simply type a new one into the box. After this, you can enter any arbitrary value into the value input field. In addition to static values, you can also use bindable values here.

Persisting values

If you wish for the values that the user has selected to persist you can select the Persist this value checkbox beneath the key/value fields. Doing so will save the value in the users browser using the localStorage API.

Deleting values

Deleting a value will delete it permanently and will also override values that are persisted.

Referencing state values

Once you have created a value you are free to bind to it across your application. All values live under the State top level bindable value and are visible in the bindings drawer.

For example, To get the value in the example image above you would enter {{ State.isPersonal }}.

An example of setting a value