---
id: designer-settings
title: "Settings and expressions"
summary: "Keep environment-specific values in expression settings packages, use them in any field with =Package.Setting, and build values from the record with the expression builder."
audience: user
keywords: "expression settings, settings package, =Package.Setting, protected, secrets, expression builder, bindings, functions, input, meta, config"
---
# Settings and expressions

## Expression settings

An expression settings package holds named values for an environment: URLs, user names, limits, secrets. Flows refer
to the values by name, so the same flow runs in test and production with each environment's own values.

### Create a package

1. Open the `/usr/config` folder.
2. Click **Add expression settings**.
3. Give the package a **Settings name**, such as `Crm`.
4. Click **Add** for each value and set its **Name** and **Value**.
5. **Save**.

Switch on protection for a value to let only the package's author and administrators change it. Other users see the
value masked, and their flows still use it.

### Use a setting

Type `=` in an empty text or number field and choose **Settings**. Pick the package and the value; the field then
reads `=Crm.ApiUrl`. At run time the field gets the value from the environment the flow runs in.

Scripts read settings with [`Services.Settings.Get("Crm", "ApiUrl")`](/documentation/scripting/services#settings).

## The expression builder

The expression builder builds a component's field value from the record, the metadata and the flow configuration,
for every record. Type `=` in a field and choose **Expression**.

```text
Order {input.Id} for {meta.SessionId}
```

Text in braces is a binding:

| Binding | Value |
|---|---|
| `{input.Field}` | A field of the incoming record |
| <code v-pre>{meta.Field}</code> | A field of the message metadata |
| <code v-pre>{config.Field}</code> | A field of the flow configuration |
| <code v-pre>{settings("Crm.ApiUrl")}</code> | An expression setting |

Write <code v-pre>{{</code> and <code v-pre>}}</code> for literal braces.

The **Fields** panel lists the input, metadata and configuration fields: double-click one to insert it. The
**Functions** panel inserts functions for text (`upper`, `lower`, `trim`, `left`, `replace`, `format`), numbers
(`round`, `floor`, `min`, `max`) and dates (`now`, `today`, `addDays`, `daysBetween`).

The builder checks the expression as you type and lists any problems with their position. The value is computed
before each call of the component.
