JungleDocs | DeleteControl function
In JungleDocs you can use the DeleteControl() and DeleteControlIf(condition) 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.
DeleteControl()deletes content control. Can be used in If(condition; trueValue; falseValue).
DeleteControlIf(condition)boolean operations are supported (>, <, >=, <=, =, <>), conditional functions like AND(condition1; condition2;...), OR(condition1; condition2;...), NOT(condition)
If(AND(Title = "Test"; Value = 5); DeleteControl(); Value)
DeleteControlIf(FieldBooleanIncludeInDocument = false)
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: