Font Size:
Ask Joget AI

App Variable

Introduction

App Variables, or Environment Variables, store commonly used parameters or settings in the application. These variables simplify migration and maintenance by centralizing commonly used values. You can retrieve App Variables using the App Variable Hash Variable. They are useful in tools like Email Tool, SQL Query Tool, etc., making it easier to manage settings and configurations.

Add app variable

Adding an App Variable allows you to define and store key parameters or settings that can be used across your application. This ensures consistency and simplifies updates. To do so, follow these steps:

  1. Access the App Variable menu.
  2. Click Add App Variable.

Now you can input the App Variable properties, such as:

  • ID: The app variable ID, only letters (a-z and A-Z), numbers (0-9), and underscores (_) are allowed. The ID cannot contain spaces. This is a mandatory field.
  • Remarks: An optional field for comments or notes is typically used by Joget developers.
  • Value: The value of the App Variable. This can be a number, static value, or a piece of software code (HTML, CSS, JavaScript, Java, etc.).
Hash Variable allows you to reference a value stored in an App Variable.

Warnings

  •  When importing apps into a new Joget platform (e.g., from development to production), update all defined environment values like IP addresses, domain names, database connection strings, etc.
  • For existing apps in a production server, avoid changing App variable counters linked to the form's ID Generator Fields to prevent issues with running numbers in new records.
  • If using the ID Generator Field as a primary key value (id), do not override the App variable value when importing apps. To avoid this, do not select Show Advanced Options > Override App Variables checkbox on the Import App screen.
    Alternatively, if an app does not have this option selected, unpublish the old app, import and publish the new version immediately. The counter app variable is version-specific and not shared. Delayed publishing or migrating while the old app remains active can cause duplicated counter values. Best practice is to export and import without delay, or unpublish the live app first to prevent counter increments during migration.

Additional resource

See the related documentation for further information on managing environment variables using forms and BeanShell scripts.

Created by Julieth Last modified by Debanraj Ravindran on Apr 24, 2026