NOTBLANK
Use the NOTBLANK function to check if a value is present.
Use
NOTBLANK( value )
Returns TRUE if a value is present.
| Parameter | Required | Description |
|---|---|---|
| value | Yes | a value to test |
| Returns | Logical |
Examples
Enforcing Mandatory Fields (Output Validation)
You can use NOTBLANK in an Output Validation formula to ensure a user does not submit a form without filling in a required field.
- Scenario: You have a "Project Title" field on a Teams Trigger form that must be completed before the approval can start.
- Formula:
ASSERT(NOTBLANK(this), "You must provide a Project Title before submitting."). - Logic:
this: In validation formulas, the keywordthisrefers to the specific output or variable being checked.NOTBLANK(this): This part of the formula evaluates to TRUE only if the user has entered text or a value into the field.ASSERT: This function displays the custom error message to the user if the internal condition (the value being present) is FALSE.
- Outcome: The system will prevent the form from being submitted until the "Project Title" is no longer empty.
Conditional Path Routing (Branch Logic)
The NOTBLANK function can be used in a Path Condition formula on a Branch step to determine which direction an approval should take based on whether optional data was provided.
- Scenario: A "Travel Request" form has an optional field for "Special Requirements." If the user provides details, the request is routed to an "Accommodations Desk"; if left blank, it proceeds directly to "Manager Review".
- Formula (for the Accommodations Desk path):
NOTBLANK(@Trigger.out.SpecialRequirements). - Logic:
@Trigger.out.SpecialRequirements: This retrieves the specific output data produced by the trigger step.NOTBLANK(...): If the user typed anything into that field, the formula returns TRUE.
- Outcome: If the condition is TRUE, the approval follows the path to the specialized desk; otherwise, it moves to the default next step.