JungleDocs | DeleteControl and DeleteControlIf commands
In JungleDocs you can use the DeleteControl and DeleteControl functions to immediately delete a whole content control. In this tutorial you will learn how to do this.
This function allows you to delete a whole content control.
If the conditions are met, content control is deleted. You can delete whole sections of the document this way, simply add a content control on top of everything and enter the function.
DeleteControlIf(condition), DeleteControl() functions available, boolean operations are supported (>, <, >=, <=, =, <>),
AND(condition1; condition2;...), OR(condition1; condition2;...), NOT(condition) functions
If(condition; trueValue; falseValue) function
true, false constants
- If(AND(Title = "Test"; Value = 5); DeleteControl(); Value)
- DeleteControlIf(FieldBooleanIncludeInDocument = false)
- IfEmpty(CompanyName; DeleteControl())
More advanced example if you would like to check two or more fields for Empty value and remove a content control:
- DeleteControlIf( AND(IfEmpty(Column1; True; False); IfEmpty(Column2; True; False)) )
- DeleteControlIf( AND(IfEmpty(Column1; True; False) = True; IfEmpty(Column2; True; False) = True) )
Note: This is different from Remove content controls from Base Rule settings as it will delete content control together with its content. Remove content controls settings in Base Rule will remove content controls but will leave the content intact: