IfEmpty function
Applies to JungleDocs for SharePoint 2010-2019.
For JungleDocs for Office 365 tutorials, click here.
This article describes the formula syntax and usage of the IfEmpty function in JungleDocs.
Description
Returns a user-defined value if a test value is empty. Returns the test column value or another user-defined value if the test value is not empty. Can be used in conjunction with other functions to perform actions instead of returning values.
Syntax
IfEmpty(testValue; trueValue; [falseValue])
The IfEmpty function syntax has the following arguments:
- testValue Required. The value that JungleDocs will check against. If it is not empty, it is displayed, unless specified otherwise by FalseValue.
- trueValue Required. The value that is displayed if TestValue is empty.
- falseValue Optional. The value that is displayed if TestValue is not empty.
Remarks
You can use virtually any expression as TestValue and TrueValue:
- a SharePoint column name
- a
recordset - a constant value (e.g., static text)
- a formula
Example
IfEmpty(Title; "Item has no title")
Returns Item has no title if the Title field is empty. If it isn't, the Title field value will be displayed.
IfEmpty(Title; "Item has no title"; "Item has a title")
Returns Item has no title if the Title field is empty. If it isn't, Item has a title will be displayed.
IfEmpty(Title;DeleteContentControl())
Deletes the content control from the place in the document if the Title field is empty. If it isn't, the Title field value will be displayed.