RPC HELP TRPCBroker Param

Param Property Example

Applies to    TRPCBroker component

Declaration property Param: TParams;

Description The Param property is available at run-time only. It holds all of the parameters that the application needs to pass to the remote procedure using the Call, strCall, or lstCall methods. Param is a zero-based array of TParamRecord. You don't need to explicitly allocate any memory for the Param property. Simple reference to an element or a value assignment ( := ) dynamically allocates memory as needed. You should start with the 0th element and proceed in sequence. Do not skip elements.

Each element in the Param array has the following properties: Passing multiple parameters of PType list in one remote procedure call (RPC) is not supported at this time. Only one list parameter can be passed to an RPC, and it must be the last parameter in the actual list.
 * Mult
 * PType
 * PType

The Param relationship to the TRPCBroker component is as follows: If the remote procedure on the VistA M Server does not require any incoming parameters, applications can pass an empty Param property. The client application merely sets the RemoteProcedure property and makes the call. If the Param property retains a value from a previous call, it can be cleared using the Example property. Thus, it is possible to make a call without passing any parameters.
 * The TRPCBroker component contains the Param property (i.e., TParams class).
 * The TParams class contains the ParamArray property (array [I:integer]: TParamRecord class).
 * The TParamRecord class contains the Mult property (i.e., TMult class).
 * The TMult class contains the MultArray property (array[S: string]: string).
 * The MultArray property internally uses a TStringList in which each element’s object is a TString.

NOTE: The following restrictions apply with the Param property: '''# You are not allowed to "skip" passing parameters, such as TAG^ROUTINE(1,,3), where you can skip passing the second parameter in DSM code. If you have fewer elements in your Param array than exist as input parameters in your RPC, the subsequent parameters will not be passed to the RPC. '''	NOTE: For a demonstration using the Param property, please run the BrokerExample.EXE located in the ..\BDK32\Samples\BrokerEx directory.
 * 1) Passing multiple array parameters in one remote procedure call is not supported at this time. Only one array parameter can be passed to an RPC, and it must be the last parameter in the actual list.