Field Compare Condition
Functionality
The Field Compare Condition compares the value of a form field to a specified value using a defined condition. This value can be a field value, a constant, or a calculated result derived from formulas or functions. The condition checks whether the field value meets the comparison condition with the given value. The comparison can be based on operators such as greater than, less than, equal to, or other types of comparisons. Depending on the result of the comparison, specific actions can be triggered.
Steps
Here are the steps to follow in order to use the field value compare condition:
Select the Field: Choose the field to compare from the dropdown list of available fields. These fields represent the data inputs or values within your page or application that can be used for comparison.
Choose the Condition: Pick the comparison operator (e.g., Equal to, Greater than, contains text etc.) from the Condition dropdown.
Specify the Comparison Value: specify the comparison value by entering a constant (e.g., a number or text), selecting another field to compare with, or using a formula to calculate a dynamic value for comparison.
You can test the values by clicking the play button below. This lets you verify the evaluated values before the comparison.
For Example
Imagine you're creating a registration form where users choose their username, and you want to restrict the word "admin". You would select the "Username" field and enter "admin" as the value to be compared. Then, you would select the condition "contains text (case insensitive)". This condition checks if the username contains the specified text in a case-insensitive manner, meaning it will detect "admin", "Admin", "ADMIN", or any other variation of capitalization. If the username includes "admin" (regardless of case), the form displays an error message saying, "Username contains restricted word 'admin'. Please choose another username." If it doesn't contain "admin", the form proceeds with the registration process.
In this example, the Set Field Error Action is used in conjunction with the field compare condition.
Last updated