Skip to main content

INT

Use the INT function to round down a number to the nearest whole number.

Use​

INT( number )
Rounds a number down to the nearest whole number.

ParameterRequiredDescription
numberYesthe number to round down

ReturnsNumber

Examples​

Calculating Complete Time Units​

You can use the INT function in an Input Mapping formula to translate a precise measurement into "full" units, such as determining the number of whole weeks in a project duration.

  • Scenario: You have a "Start Date" and an "End Date" in your trigger. You want a reviewer to see the total number of full weeks the project will take, ignoring any partial weeks.
  • Formula: INT(DAYS(@Trigger.out.EndDate, @Trigger.out.StartDate) / 7)
  • Logic:
    • DAYS(...): Calculates the total number of days between the two dates (e.g., 10 days).
    • / 7: Divides the total days by 7 to get the number of weeks (e.g., 1.428 weeks).
    • INT(...): Strips away the decimal, returning 1. This provides the reviewer with a count of completed weeks only.

Validation to Enforce Whole Number Entries​

In an Output Validation Formula, the INT function can be used to ensure that a user has provided a whole number rather than a decimal.

  • Scenario: A user is entering the "Number of Units" they wish to order. Since units cannot be split, you must prevent them from entering a decimal like "5.5".
  • Formula: this = INT(this)
  • Logic:
    • this: Refers to the value the user currently has in the field.
    • INT(this): Rounds that value down to the nearest integer.
    • Result: If the user enters 5, then 5 = INT(5) (5 = 5) is TRUE, and the input is valid. If the user enters 5.5, then 5.5 = INT(5.5) (5.5 = 5) is FALSE, and the entry is marked as invalid.