1. Home
  2. Docs
  3. Master Form
  4. Definitions
  5. Compare Fields and Definitions

Compare Fields and Definitions

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.

  1. Label the definition
  2. Select first field to compare
  3. Select comparison operation
  4. Select second field to compare
'Compare Fields and Definitions' in the list of calculation types

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.

Select the first field by Opening field Chooser
Opened Field Chooser Will Only Offer Fields That Can Be Compared
After selecting a field definition that produces a quantity value

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

Available Quantity Comparisons

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. 

Date Comparison setup: Select Comparison Type, then select either predefined date field or select another date field on a form
Available Date 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.

Chose the second field for the date Comparison

How can we help?