---
title: "Use embedded expressions within acceptable values and pass conditions"
app: "Quality Inspector"
section: "How-to guides"
last_updated: "2024-11-01"
url: "https://insight-works.com/kb/quality-inspector/use-embedded-expressions-within-acceptable-values-and-pass-conditions/"
---

# Use embedded expressions within acceptable values and pass conditions

To change allowable values of a field to be dynamic, you can use embedded expressions.

1. Navigate to _Quality Inspector Fields_ in Business Central.
2. Locate the field you would like to change the allowable values for.
3. Edit the field’s _Allowable Values_ column to reference the appropriate field.

### Example One

Here is an example with Surface Temperature having a dynamic allowable values minimum range, depending on the value entered by the ambient temperature.

| **Field** | **Default Value** | **Allowable Values** |
| --- | --- | --- |
| AmbientTemperature | 0 | 1..20 |
| SurfaceTemperature | 0 | [AmbientTemperature]..30 |

 Note: If you reference another field, we recommend that the field has a default value. This ensures the expression can be evaluated without giving Quality Inspector an error. Note: You can also use numerical expressions within the allowable values by using to contain the numerical expression. Numerical expressions can also contain references to other fields as part of the equation.

### Example Two

Here is an example with Surface Temperature having a dynamic allowable values minimum range, where the minimum allowable value changes depending on the entered ambient temperature, to be the ambient temperature less 10, as the minimum, and ambient temperature plus 20 as the maximum.

| **Field** | **Default Value** | **Allowable Values** |
| --- | --- | --- |
| AmbientTemperature | 0 | 1..20 |
| SurfaceTemperature | 0 | {[AmbientTemperature]-10}..{[AmbientTemperature]+20} |

### Change pass conditions to have embedded expressions

1. Navigate to your Quality Inspection Templates.
2. Locate the field you want a dynamic expression for the pass condition.
3. Use [FieldValue] to reference another field in the test (see example below).

#### Example: embedded expressions

You could have the pass condition change for _Surface Temperature_ to the minimum recorded ambient temperature and a maximum pass condition of the ambient temperature plus 100, you could have the following configuration:

| **Field** | **Pass** |
| --- | --- |
| AmbientTemperature | 1..30 |
| SurfaceTemperature | [AmbientTemperature]..{[AmbientTemperature]+100} |
