UDP functionUnofficial Content

Note: For GeneXus 9.0 or higher versions, we recommend using the Udp method.


The Udp (User Defined Procedure) function, is used to call a GeneXus object with a particular feature: it will return necessarily a result to the object that called it.

Syntax

&VariableName|AttributeName =ObjectName.Udp([par1 , ..., parn])  

Where:

&VariableName
    Is the name of a  variable defined in the caller object. It will receive the data returned by the invoked object with the Udp function.

AttributeName
    Is a valid attribute name defined in the knowledge base. It will receive the data returned by the invoked object with the Udp function.

ObjectName
      Is the name of the object we want to invoke, using the Udp function.

par1, …, parn
      Are optional parameters that can be sent to the called object with some purpose (and they must be received in the called object by declaring them with the Parm rule.


Example

The following invocation using the Udp function, is used to call a procedure that calculates the number of points of a certain pilot in an airline company:

&TotalPoints = UDP(PCalPts, PilotNbr);

In the rules section of the CalPts procedure, the following parm rule must be declared:

Parm(PilotNbr, &TotPts);

The first parameter declared inside the Parm rule is the received parameter. And the last parameter corresponds to the one that it's value is calculated in the procedure, and assigned to the &TotalPoints variable which is before de equal sign in the invocation.

 

See Also

Udp method
Parm rule
Definition of type of parameters received (in, out, inout)