Return values from ancestor events

Return values from ancestor events

How can I determine the return value of an ancestor event from its descendant?

For example, the PFC_addrow event of the PFC datawindow. If I were to extend this event, I would like to know the number of the added row (return value of PFC_addrow).

Any clues?

There is no way to get the return value from an ancestor event. However,there is a way to do what you want. In your descendant script, overloadthe event for which you want to get the return value. Then, in yournew descendant event, call the ancestor event code and capture the returnvalue locally. Then process your script as normal.

In the following piece of sample code, I have created a user object withan event called ue_ken, which takes no parameters but returns astring. In my window I have placed a copy of the control and overloadedthe ue_ken event. The following code is used to call the ancestor eventand capture the return value:

// OVERLOADED EVENT! BE-CAREFUL.String ls_Val// Call ancestor scriptls_Val = super::TRIGGER STATIC EVENT ue_ken()// My custom processing!// …// …RETURN ls_Val

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular