BPC-Components

Home > Products > BPC PowerForms > Knowledge Base > Scripting > Handling the Value-Change event of controls

Handling the Value-Change event of controls

There is a special section in the control properties dialog where users can write the client-side script that will be executed when the value for that control changes.

All the available methods and properties of the "form" object or the individual control methods can be found here :

Form properties and methods

Control properties and methods

The Value-Change event of each control is raised every time the value of that control changes due to :

1. A user action on the control
2. The form itself setting the value during initialization
3. A script added in the form that changes the value of a specific control.

In order to determine if the change is due to the initialization of the form, the "form.Loaded" property should be used.

For example :

Code

var value = form.GetControl("c_Status").GetValue();

if (form.Loaded) {

  if (value == "Closed") form.GetControl("c_Progress").SetValue("100");

}