When configuring Task and Item Types, the administrator can use a feature called "Range Checking" to make sure the user enters data within a specific range. For example, you can require the number of samples in a request to be between 1 and 10. The administrator can choose to either warn the user if their input is outside the allowed range or prevent them from continuing until they correct it.
Custom Fields that Support Range Checking
The following Custom Field types allow administrators to configure range checking when they're added to Task and Item Types.
Configuring Range Checking
If no Range Checking is set up for the above Custom Field types, users can enter any positive or negative value. There are two Range Checking options: Warning and Error. You can use them separately or together, and each allows you to set a Minimum, a Maximum, and a message to show the user. You don't have to set both a minimum and a maximum.
- Warning: If a Warning is set, the field will have an orange border. When hovered over, the warning message will appear. The user can still publish the form even with the warning.
- Error: If an Error is set, the field will have a red border. When hovered over, the error message will appear. The user cannot publish the form until they enter a value within the defined range, but they can save the form as a Draft.
Note: Make sure the error range is higher than the warning range, or the user won't see the warning. For example, if the warning limit for "Sample Quantity" is set to 12 and the error limit is set to 10, a user entering 15 will get an error since the error limit is lower.
Default Message
When hovering over a Custom Field with Range Checking applied, a default message will always be displayed to the user "Values must be between x and y". The warning and error message is only to add additional context based on the purpose of the form and the fields on it.
Examples
Here are some simple ways you might use Range Checking.
- A lab technician needs to enter the material thickness after carrying out some tests on a sample of board. The material thickness can't be a negative value and the company doesn't work with very thick board. As the user needs to be able to enter any reasonable value, only an Error Range Check is required:
- Error
- Minimum = 0.01mm
- Maximum = 12.00mm
- Message - No message is needed. The default message tells the user everything they need to know.
- Displayed Message:
Values must be between 0.01mm and 12.00mm
- Error
- A salesperson needs to enter the quantity of samples the customer wants. If there's more than 8 then approval is needed from the sales manager. No more than 20 is permitted.
- Warning
- Minimum - No minimum value is needed (see error).
- Maximum - 8. Anything more than this will need a sales manager's approval.
- Message - "Approval from a sales manager is needed for between 9 and 20 samples."
- Error
- Minimum - 1. A sample request asking for no samples doesn't make any sense so you should always add a lower limit to fields that must have a value added.
- Maximum - 20. The upper sample quantity limit.
- Message - "More than 20 samples is not permitted."
- Displayed message:
Recommended values are less than or equal to 8
Approval from a sales manager is needed for between 9 and 20 samples.
Values must be between 1 and 20
More than 20 samples is not permitted.
- Warning