Table of contents

 




Unofficial Content
  • This documentation is valid for:

Note: For GeneXus 9.0 or higher versions, use 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 =UDP(ObjectName[,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 you 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 the equal sign in the invocation.

 

See Also

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

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