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

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 field is valid between weightMin and weightMax and weightMin2 and weightMax2 where:

  • Valid (Green): weightMin and weightMax
  • Valid: (Amber): weightMax and weightMin2
  • Invalid (Red): 1==1

 

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

Rule 1: Valid for the first range

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

Step 1 - Drag 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. 

Rule 2: Valid for the second range

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

Rule 3: Create the catch-all invalid rule

1==1

Screenshot 2025-08-08 at 2.14.10 pm

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

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