Defines a set of actions to be performed when the object starts running. It is a Client-side Event that takes place before the Server Events (Start, Refresh, and Load).
Since it is a Client-side Event, it has the same possibilities and limitations as any other Client-side Event.
Important: To initialize the application layout it is recommended to use Navigation Start Events instead of the ClientStart event because it may cause unwanted behavior for some Navigation Styles.
Event ClientStart
Event_code
EndEvent
Where:
Event_code
Code associated with the event.
The object parameters are available on this event.
The variables of this event are available for the rest of the events (that is, you can have a grid filtered by a variable assigned in the ClientStart Event).
This event is ALWAYS executed regardless of the specified security schema.
If you need to know the user's location before loading a Panel object, you can call the Geolocation API:
Event ClientStart
&DeviceLocation = GeoLocationAPI.GetMyLocation(10,10,true,true)
EndEvent
In applications using Slide Navigation Style, the behavior of the ClientStart event differs between Android and iOS:
- Android: The ClientStart event of the Slide Panel is triggered each time a new panel is loaded in the main target. This occurs because the Slide Panel is recreated for each new navigation.
- iOS: The ClientStart event is triggered only once when the Slide Panel is initially loaded. It does not trigger again for subsequent navigations.
Notes:
- To achieve consistent behavior across platforms, use the Slide.Start event for initialization code related to the Slide Navigation, as it is executed only once when the application starts.
- Use ClientStart for panel-specific initialization code, but be aware of the platform-specific behavior differences.
Objects: Panel, Menu
Event Triggering Order in Panels