# Custom variables

Defining custom variables enables you to create reusable values that can be dynamically controlled, eliminating the need for hardcoding. This approach offers flexibility, allowing values to be updated instantly and seamlessly applied throughout the app. Custom variables are particularly effective for storing environment-specific values that change over time, such as URLs.

### Creating and setting variables

Custom variables are created and set in the [Solution Settings](/administration/solutions/solution-settings.md) page in [Jigx Management](/administration/management-overview.md) and consist of a variable name and a variable value.

<figure><img src="/files/uRpz44jmLlBoBQ7u8MmR" alt="Custom Variables"><figcaption><p>Custom Variables</p></figcaption></figure>

1. Open [Jigx Management](/administration/management-overview.md), navigate to the solution where the variables will be used.
2. Select [Solution Settings](/administration/solutions/solution-settings.md) in the left navigation pane.
3. Select the **Custom** tab.
4. Type a name for the variable in the text field and click the **+** sign. This creates the **variable name**, which appears at the top of the field.
5. Next, type the **variable value** in the text field.
6. Click **Save** in the top right-hand corner.

Now that your variables are set, you can use the variables throughout the solution in Jigx Builder.

### Using variables

Custom variables are expression based, meaning you can use it wherever expressions are configurable in Jigx Builder. To reference the variable, the following expression is used:

```yaml
=@ctx.solution.settings.custom.{{variableName}} 
```

Use IntelliSense to select the `variableName` you set in *Management > Solution Settings*.

#### Reloading variables in Jigx Builder

After adding a new custom variable in Management, you can use the *Reload Solution Settings* option in Jigx Builder to refresh IntelliSense and make the variable available.

<figure><img src="/files/RdhChyY1ZN2ywIPWwEcI" alt="Reload variables in Jigx builder"><figcaption><p>Reload variables in Jigx builder</p></figcaption></figure>

### Considerations

* Do not store API keys, passwords or secrets in custom variables, as they are not encrypted or secure.
* Variables are solution specific, and cannot be used across multiple solutions.
* Custom variable values are read only in the mobile app.
* Best practice is to use custom variables to configure environment variables, relating to:
  * Production, development, or test URLs.
  * Customer preferences, for example, a base solution that is used for multiple customers, departments, stores. Simply change the variable value to apply to each customer.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jigx.com/administration/solutions/solution-settings/custom-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
