show / hide menu

Clear

Purpose

The Clear function clears values from form controls. It can be used to clear all controls in a form or only the specified control(s).

Syntax

Clear()

Clear(ControlName)

Clear(ControlName1, ControlName2, …, ControlNameN)

Arguments

1. ControlName (Optional) – Specific control to be cleared

2. ControlName1, ControlName2, …, ControlNameN (Optional) – A comma-separated list of controls whose values need to be cleared.

Examples

1. Clear all controls – Clears the values of all controls in the form. 

Clear()

2. Clear a specific control – Clears the value of TextBox1.

Clear(TextBox1)

3. Clear multiple controls – Clear multiple controls.
Clear(TextBox1, TextBox2, TextBox3, ComboBox1)

Note: Normally, changing a control’s value triggers any rules associated with its Value Changed event. However, when the Clear function is used, the control values are cleared silently without triggering the associated Value Changed rules.