Use this calculation in a definition that compares fields and definitions. The result of the comparison will be a ‘True’ or ‘False’ logical value. A definition using this calculation type is often used in other definitions such as ‘Get a Form Stack‘ which then keeps or discards forms based on the comparison definition.
Comparisons can be simple or complex. For example a simple comparison is checking if the count of unpaid invoices for a vendor is greater than zero. A more complex comparison would be checking if the middle part of a three part form code field matches another field value.
Compare the following types:
Comparison Types
quantity field comparisons
Single Field Comparisons
- is greater than zero
- is greater than or equal to zero
- is less than zero
- is less than or equal to zero
- is not equal to zero
Two Field Comparisons
- is equal to
- is not equal to
- is less than or equal to
- is strictly less than
- is greater than or equal to
- is strictly greater than
Date field comparisons
Pre-defined Dates
- first day of current fiscal year
- first day of current accounting period
- last day of current fiscal year
- last day of current accounting period
Two Field Comparisons
- is same day as
- is different day from
- is same day or earlier than
- is same day or later than
- is before
- is after
Description field comparisons
- human compare
- normal text compare
- case insensitive compare
Configuration
These are the basic steps to configure this calculation type. Formever will lead you through as you point and click.
- Label the definition
- Select first field to compare
- Select comparison operation
- Select second field to compare
Step 1 - Label Definition
Give the definition a descriptive label. This doesn’t have to be done first. But make sure you provide a descriptive label before filing the master form. Since definitions are used throughout the system a descriptive label is recommended.
Doing it first serves as a reminder of what you are trying to accomplish as you configure the definition.
Design Tip:
Create a definition label in the form a yes/no or true/false question and use a "?". This indicates to a reader that the definition produces a logical result. Even though Formever will only offer logical definitions when appropriate the question style label reinforces this to a designer working on the system in the future.
Step 2 - Select First Field To Compare
Begin by selecting the first field to used in the comparison. Click on the ‘Select a field to compare’ text and the field chooser will open.
Step 3 - Select Comparison Operation
Choose the comparison operation to be used. Click on the text ‘is equal to’ to display the available comparison operations.
Depending on the type of the first field different comparison operations will be available. For example, for a date field only date comparisons will be offered. For a quantity field only quantity type comparisons will be offered.
Quantity Field Comparison
Date Field Comparison
With date comparison chose the comparison type, then either select from pre-defined dates or select another date field.
Click on the text ‘is the same day as’ to display the available data comparisons.
Step 4 - Select Second field
Not all comparisons are between two fields. For example, testing against zero for quantities.
If the chosen comparison operation requires a second field then, after choosing the operation to perform, pick the second field to apply the operation.
Click on the text ‘Select a field to compare’ to open the field chooser. Only accessible compatible fields will be offered.