Unofficial Content

The way in which the Load and Start events work is the same as on the Web. For example, the Load event: if we arrange attributes in a List layout, as we would do in a Web Panel object with Base Table that doesn’t have any more operations than the loading itself, the event would be automatic, with no code in the Events selector (for more information see Selecting Events). On the other hand, if, for instance, we add variables that we want to load with values, the Load event will have to be programmed.

Events - Grid InputMeasures

Event Load
    &MaxMin = str(InputMeasuresMaximum,3,0) + '/' + Trim(str(InputMeasuresMinimum,3,0))
    If InputMeasuresMaximum =< InputMeasuresMinimum
       &WarningColour = LoadRGB(InputMeasuresMaximum,InputMeasuresMinimum)
    EndIf
EndEvent

Here we can see a Work With with attributes and variables. Attributes are automatically loaded, and variables are manually loaded in the Load event.

Another example could be:

Event Load
    If PersonPosition = Person.CEO
       Image1.Visible= True
    Else
       Image1.Visible= False
    EndIf
EndEvent

In addition, the settings made in any event can be viewed in the Load event. For example, let’s suppose that we have the following code:

Event Start
    Do case
       case &WhatCase = "A"
            &MaxMin = str(InputMeasuresMaximum,3,0) + '/' + Trim(str(InputMeasuresMinimum,3,0))
       case &WhatCase = "J"
            &WarningColour = LoadRGB(InputMeasuresMaximum,InputMeasuresMinimum)
    EndCase
    &info = getPerson.Udp()
    &AddName = &info.PersonaName
    &AddLastName = &info.PersonaLName
    &AddMail = &info.PersonaEmail
    &AddCompany = &info.PersonaCompany
EndEvent

In the Load event, the value of &WhatCase and of the other assigned variables will be those stored in the Start event.

Videos

Start Video Work With for Smart Devices – Behavior through Events
Start Video Events in Smart Devices

See Also

Event Triggering Order in Panels

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