Skip to content
  • There are no suggestions because the search field is empty.

How to validate a range in my flow form using product metadata?

This article will guide you in validating a field based on the value from a product metadata in your flow form.

In this example, the field is valid between weightMin and weightMax

Create the first valid range by:

(data["weight"]>=(jobmeta["weightMin"]))&&(data["weight"]<=(jobmeta["weightMax"]))
Step 1 - Dragging in the field from the form layout and drop anywhere in the grey space

Screenshot 2025-08-08 at 1.56.33 pm

Step 2 - Drag in the 'greater than ≥' symbol

Screenshot 2025-08-08 at 1.57.47 pm

Step 3 - Drag 'Product Data' on the '0' to replace. Click 'ratedSpeed' and select the product data e.g. weightMin

Screenshot 2025-08-08 at 1.59.16 pm

Screenshot 2025-08-08 at 2.00.57 pm

Step 4 - Drag in the 'AND' operator and drop after the parentheses

Screenshot 2025-08-08 at 2.03.11 pm

Step 5 - Dragging in the field from the form layout and replace the '0'

Screenshot 2025-08-08 at 2.06.17 pm

Step 6 - Drag in the 'less than' symbol ≤ and drop it inside the parentheses

Screenshot 2025-08-08 at 2.10.03 pm

Step 7 - 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


Step 8
 - Click on the 'Valid' word

Screenshot 2025-08-08 at 2.12.14 pm

 

Step 9 - 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. 

Step 10 - Create the invalid rule by dragging the value into the dotted line

Screenshot 2025-08-08 at 2.14.10 pm

Step 11 - Enter the rule 1==1 in the white area. This code invalidates everything outside of the valid range.

Step 12 - Click the 'valid' word and set the Form Status to 'invalid', select a colour and add a message if needed.