ISODD
Use the ISODD function check if a number value is odd.
Use
ISODD( value )
Returns TRUE if the number is odd.
| Parameter | Required | Description |
|---|---|---|
| value | Yes | any number value to test |
| Returns | Logical |
Examples
Output Validation for Specific Quantity Requirements
You can use ISODD in an Output Validation Formula to ensure a user enters data that meets a specific logical requirement. This is often paired with the ASSERT function to provide clear feedback to the user.
- Scenario: A specialized shipping process requires that a "Sample Count" field always contain an odd number of items for balanced testing.
- Formula:
ASSERT(ISODD(this), "The number of samples provided must be an odd number.") - Logic:
this: Refers to the current value the user has entered in the "Sample Count" widget.ISODD(this): Evaluates whether the number is odd.- Result: If a user enters 5, the formula returns TRUE, and the form is valid. If they enter 6, the formula returns FALSE, and the custom error message is displayed.
Conditional Branching (Run Number Routing)
You can use ISODD within a Path Condition Formula to alternate which path an approval takes based on the system-generated run number.
- Scenario: You want to distribute requests between two different audit teams. Team A handles all odd-numbered runs, while Team B handles all even-numbered runs.
- Formula (for the Team A path):
ISODD(@prop.RunNumber) - Logic:
@prop.RunNumber: This system property retrieves the unique, sequential number of the current approval run (e.g., 1051).ISODD(...): Checks the run number.- Result: For run 1051, the function returns TRUE, and the approval follows the path to Team A. For run 1052, it returns FALSE, and the system checks the next available path.
Pro Tips: If your numeric data is currently stored as Text (such as a project code like "103"), you must first convert it using the VALUE function before applying ISODD, as the function expects a Number data type.