RPC HELP TParamRecord PType Property

From VistApedia
Revision as of 18:26, 8 July 2015 by Kdtop (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PType Property

Example

Applies to

   TParamRecord class

Declaration

   property PType: TParamType;
   (PType is a property of the TParamRecord used in the Param property.)

Description

The PType design-time property determines how the parameter will be interpreted and handled by the Broker.

Value -- Definition

  • literal -- The VistA M Server receives the contents of the corresponding Value property as one string or one number.
  • reference -- The VistA M Server receives the contents of the corresponding Value property as a name of a variable defined on the server. Using indirection, the Broker on the server will resolve this parameter before handing it off to the application.
  • list -- This value is used whenever an application wants to send a list of values to the VistA M Server. In this case, the contents of the corresponding Mult property is sent, while the Value property is ignored.
  • undefined -- The Broker uses this value internally. It should not be used by an application.

For instance, if you need to pass an empty string to the remote procedure call (RPC), the Value property should be set to " (i.e., null) and the PType to literal. Using reference, a programmer can pass an M variable (e.g., DUZ) without even knowing its value. However, If the M variable being referenced is not defined on the VistA M Server, a run-time error will occur. When passing a list to an RPC: set the PType to list, populate the Mult property, and don't put anything into the Value property (in this case, Value is ignored).

NOTE: For a demonstration using PType, please run the BrokerExample.EXE located in the ..\BDK32\Samples\BrokerEx directory.