---
title: How to validate a field against a dynamic range (product metadata)?
description: This article will guide you in validating a number range in your flow form.
---

[Skip to content](https://support.ofsystems.com/how-to-validate-a-range-using-product-metadata#main-content)

![OFS\_Circle.png\]](https://support.ofsystems.com/hs-fs/hubfs/OFS_Circle.png?height=45&name=OFS_Circle.png)

- [OFS Customer Portal](https://support.ofsystems.com/)
- [Main Website](https://ofsystems.com/)
- [Contact Us](https://www.ofsystems.com/contact-us?)
- [Service Portal](https://ofsystems.atlassian.net/servicedesk/customer/portal/1)

Open main navigation

Close main navigation

- [OFS Customer Portal](https://support.ofsystems.com/)
- [Main Website](https://ofsystems.com/)
- [Contact Us](https://www.ofsystems.com/contact-us?)
- [Service Portal](https://ofsystems.atlassian.net/servicedesk/customer/portal/1)

 Welcome to the OFS Customer Portal

- There are no suggestions because the search field is empty.

1. [OFS Customer Portal](https://support.ofsystems.com/?hsLang=en)
2. [How To Questions](https://support.ofsystems.com/how-to-questions?hsLang=en)
3. [Flow - Validations](https://support.ofsystems.com/how-to-questions?hsLang=en#flow-validations)

# How to validate a field against a dynamic range (product metadata)?

## You can validate an input field against a min/max range that is pulled directly from your Product List (product metadata). This is ideal for quality checks where specifications change for each product.

In this example, the **weight** field is valid between `weightMin` and `weightMax`, or between `weightMax` and `weightMin2` as a secondary range:

- Valid (green): between `weightMin` and `weightMax`.
- Valid (amber): between `weightMax` and `weightMin2`.
- Invalid (red): everything else.
  
  ![](https://support.ofsystems.com/hs-fs/hubfs/image-png-Nov-10-2025-01-46-50-0057-AM.png?width=670&height=548&name=image-png-Nov-10-2025-01-46-50-0057-AM.png)

We will create three separate rules on the 'weight' field. The rules are checked from top to bottom.

**Step 1 — Build the first range rule**

```
(data["weight"]>=jobmeta["productWeightMin"])&&(data["weight"]<=jobmeta["productWeightMax"])
```

![](https://support.ofsystems.com/hs-fs/hubfs/image-png-Nov-10-2025-01-55-33-6483-AM.png?width=590&height=265&name=image-png-Nov-10-2025-01-55-33-6483-AM.png)

- Drag in the field from the form layout and drop it anywhere in the grey space
  
  ![Screenshot 2025-08-08 at 1.56.33 pm](https://support.ofsystems.com/hs-fs/hubfs/Screenshot%202025-08-08%20at%201.56.33%20pm.png?width=670&height=317&name=Screenshot%202025-08-08%20at%201.56.33%20pm.png)

- Drag in the **greater than ≥** symbol
  
  ![Screenshot 2025-08-08 at 1.57.47 pm](https://support.ofsystems.com/hs-fs/hubfs/Screenshot%202025-08-08%20at%201.57.47%20pm.png?width=670&height=453&name=Screenshot%202025-08-08%20at%201.57.47%20pm.png)

- Drag** Product Data **onto the 0 to replace it. Click **ratedSpeed** and select the product data e.g. **weightMin**

![Screenshot 2025-08-08 at 1.59.16 pm](https://support.ofsystems.com/hs-fs/hubfs/Screenshot%202025-08-08%20at%201.59.16%20pm.png?width=670&height=227&name=Screenshot%202025-08-08%20at%201.59.16%20pm.png)

![Screenshot 2025-08-08 at 2.00.57 pm](https://support.ofsystems.com/hs-fs/hubfs/Screenshot%202025-08-08%20at%202.00.57%20pm.png?width=536&height=359&name=Screenshot%202025-08-08%20at%202.00.57%20pm.png)

- Drag in the **AND** operator and drop it after the parentheses
  
  ![Screenshot 2025-08-08 at 2.03.11 pm](https://support.ofsystems.com/hs-fs/hubfs/Screenshot%202025-08-08%20at%202.03.11%20pm.png?width=599&height=360&name=Screenshot%202025-08-08%20at%202.03.11%20pm.png)
- Drag in the field from the form layout and replace the **0**

![Screenshot 2025-08-08 at 2.06.17 pm](https://support.ofsystems.com/hs-fs/hubfs/Screenshot%202025-08-08%20at%202.06.17%20pm.png?width=670&height=187&name=Screenshot%202025-08-08%20at%202.06.17%20pm.png)

- Drag in the **less than** symbol **≤** and drop it inside the parentheses

![Screenshot 2025-08-08 at 2.10.03 pm](https://support.ofsystems.com/hs-fs/hubfs/Screenshot%202025-08-08%20at%202.10.03%20pm.png?width=670&height=450&name=Screenshot%202025-08-08%20at%202.10.03%20pm.png)

- Drag **Product Data** on the **0** to replace. Click **ratedSpeed** and select the product data e.g. **weightMax**

**![Screenshot 2025-08-08 at 2.11.26 pm](https://support.ofsystems.com/hs-fs/hubfs/Screenshot%202025-08-08%20at%202.11.26%20pm.png?width=670&height=229&name=Screenshot%202025-08-08%20at%202.11.26%20pm.png)**

- Click on the **Valid** word

![Screenshot 2025-08-08 at 2.12.14 pm](https://support.ofsystems.com/hs-fs/hubfs/Screenshot%202025-08-08%20at%202.12.14%20pm.png?width=587&height=183&name=Screenshot%202025-08-08%20at%202.12.14%20pm.png)

- Set up the **Form Status**, **Colour,** and add a **message** if needed.

**Note:** The Error status will not allow the user to submit the form until the field is valid. 

**![](https://support.ofsystems.com/hs-fs/hubfs/image-png-Sep-25-2024-06-08-53-1462-AM.png?width=321&height=396&name=image-png-Sep-25-2024-06-08-53-1462-AM.png)**

#### **Step 2 — Build the second range rule**

Repeat the same pattern for the second range, referencing the field and the second set of product data values:

```
(data["Metadata"]>=jobmeta["productWeightMin2"])&&(data["Metadata"]<=jobmeta["productWeightMax2"])
```

![](https://support.ofsystems.com/hs-fs/hubfs/image-png-Nov-10-2025-01-43-42-2103-AM.png?width=587&height=268&name=image-png-Nov-10-2025-01-43-42-2103-AM.png)

#### **Step 3 — Add the catch-all invalid rule**``

```
1==1
```

![Screenshot 2025-08-08 at 2.14.10 pm](https://support.ofsystems.com/hs-fs/hubfs/Screenshot%202025-08-08%20at%202.14.10%20pm.png?width=670&height=297&name=Screenshot%202025-08-08%20at%202.14.10%20pm.png)

Click the "Valid" word and change it to "Invalid", select a colour, and add a message if required.

![](https://support.ofsystems.com/hs-fs/hubfs/image-png-Sep-23-2024-07-02-56-1594-AM.png?width=593&height=181&name=image-png-Sep-23-2024-07-02-56-1594-AM.png)

- [Getting Started](https://support.ofsystems.com/getting-started?hsLang=en#main-content)

    - [Console: The Basics](https://support.ofsystems.com/getting-started?hsLang=en#console-the-basics)
    - [Analytics: The Basics](https://support.ofsystems.com/getting-started?hsLang=en#analytics-the-basics)
    - [Fusion Manager: The Basics](https://support.ofsystems.com/getting-started?hsLang=en#fusion-manager-the-basics)
    - [OFS-Flow Training : The Basics](https://support.ofsystems.com/getting-started?hsLang=en#ofs-flow-training-the-basics)
    - [OFS-Go](https://support.ofsystems.com/getting-started?hsLang=en#ofs-go)
    - [MayvnAI](https://support.ofsystems.com/getting-started?hsLang=en#mayvnai)
- [Help & Support](https://support.ofsystems.com/help-support?hsLang=en#main-content)

    - [Troubleshooting](https://support.ofsystems.com/help-support?hsLang=en#troubleshooting)
    - [OFS in a Box](https://support.ofsystems.com/help-support?hsLang=en#ofs-in-a-box)
    - [Routers](https://support.ofsystems.com/help-support?hsLang=en#routers)
    - [PLCs](https://support.ofsystems.com/help-support?hsLang=en#plcs)
- [Success with MayvnAI](https://support.ofsystems.com/success-with-mayvnai?hsLang=en)
- [Training Videos](https://support.ofsystems.com/training-videos?hsLang=en#main-content)

    - [Operator Console](https://support.ofsystems.com/training-videos?hsLang=en#operator-console)
    - [OFS Analytics](https://support.ofsystems.com/training-videos?hsLang=en#ofs-analytics)
    - [Fusion-Manager](https://support.ofsystems.com/training-videos?hsLang=en#fusion-manager)
    - [OFS-Flow](https://support.ofsystems.com/training-videos?hsLang=en#ofs-flow)
    - [OFS-Go](https://support.ofsystems.com/training-videos?hsLang=en#ofs-go)
- [How To Questions](https://support.ofsystems.com/how-to-questions?hsLang=en#main-content)

    - [Administration](https://support.ofsystems.com/how-to-questions?hsLang=en#administration)
    - [Operator Console](https://support.ofsystems.com/how-to-questions?hsLang=en#operator-console)
    - [Analytics](https://support.ofsystems.com/how-to-questions?hsLang=en#analytics)
    - [Fusion Manager](https://support.ofsystems.com/how-to-questions?hsLang=en#fusion-manager)
    - [Fusion Manager - Alerts & Services](https://support.ofsystems.com/how-to-questions?hsLang=en#fusion-manager-alerts-services)
    - [Flow](https://support.ofsystems.com/how-to-questions?hsLang=en#flow)
    - [Flow - Validations](https://support.ofsystems.com/how-to-questions?hsLang=en#flow-validations)
    - [Flow - Conditional Expression & Triggers](https://support.ofsystems.com/how-to-questions?hsLang=en#flow-conditional-expression-triggers)
    - [APIs](https://support.ofsystems.com/how-to-questions?hsLang=en#apis)
- [FAQs](https://support.ofsystems.com/faqs?hsLang=en#main-content)

    - [Operator Console](https://support.ofsystems.com/faqs?hsLang=en#operator-console)
    - [Fusion Manager](https://support.ofsystems.com/faqs?hsLang=en#fusion-manager)
    - [Analytics](https://support.ofsystems.com/faqs?hsLang=en#analytics)
    - [OFS-Flow](https://support.ofsystems.com/faqs?hsLang=en#ofs-flow)
- [Case Studies](https://support.ofsystems.com/case-studies?hsLang=en#main-content)

    - [Mavyn AI](https://support.ofsystems.com/case-studies?hsLang=en#mavyn-ai)
- [OFS Guides](https://support.ofsystems.com/ofs-guides?hsLang=en)
- [Webinars](https://support.ofsystems.com/webinars?hsLang=en)

[![](https://support.ofsystems.com/hs-fs/hubfs/Logo%20Medium_no%20words.png?width=128&height=68&name=Logo%20Medium_no%20words.png)](http://ofsystems.com)

Operations Feedback Pty Ltd

7/627 Chapel St, South Yarra, VIC 3123  
+61 3 8684 9859

<https://www.ofsystems.com/> <https://www.linkedin.com/company/operations-feedback-systems/> [mailto:support@ofsystems.com](mailto:support@ofsystems.com)

Copyright © 2025, Operations Feedback Systems Pty Ltd.