Official Content

This event is to execute some code at the time the user finishes entering data in an input.

This pursuit the goal of giving constant feedback to the user. We noticed that an event that many apps need to trigger some action is when the value of a given input is changed. It is very useful to give feedback or update data that are tightly related. 

Syntax

Event &VarOrAtt.ControlValueChanged
     Event_code
EndEvent

Where:

&VarOrAtt:

Any variable or attribute that it is on a layout. The event will be triggered once the control looses focus or, in some cases, the value has been set.

Event_code

The code that will be executed when the event triggers (it is like any other User Event in Smart Devices). The moment depends on the control. For example:

  • Edit controls will execute the event once it looses focus, not when every key is pressed.
  • Wheel controls will execute it once the wheel stopped spinning, not when the user spins for each value.

Note: If the value of the field is changed programmatically (by code), the ControlValueChanged event is not going to be executed (e.g. an assignation on another User event).

Scope

Controls Attribute/Variable control
Interfaces Smart Devices, Web

Temporal restrictions

The ControlValueChanged event is not available for the following controls:

Android

  • Prompts associated to fields

iOS

  • Video & Audio fields
  • Multi Wheel
  • Physical Measures
  • Prompts associated to fields

Availability

This feature is available as of GeneXus X Evolution 2 Upgrade 4 in iOS and Android, and as of GeneXus 15 Upgrade 6 in Web too.

See also

HowTo: Use ControlValueChanged event








Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant