Difference between revisions of "RPC HELP TMult"

From VistApedia
Jump to: navigation, search
(Created page with " RPC Broker Help Home")
 
Line 1: Line 1:
 
[[RPC_Broker_Help| RPC Broker Help Home]]
 
[[RPC_Broker_Help| RPC Broker Help Home]]
 +
<h2>TMult Class</h2>
 +
* [[RPC_Broker_TMult_Properties|Properties]]
 +
* [[RPC_Broker_TMult_Methods|Methods]]
 +
* [[RPC_Broker_TMult_Example|Example]]
 +
 +
[[RPC_HELP_TRPCB_Unit|TRPCB Unit]]
 +
 +
Description
 +
The TMult class is used whenever a list of multiple values needs to be passed to a remote procedure call (RPC) in a single parameter. The Mult property of a parameter is of TMult type. The information put in the TMult variable is really stored in a TStringList, but the access methods (used to read and write) take strings as subscripts and provide the illusion of a string-subscripted array.
 +
 +
It’s important to note that items in a TMult class may or may not be sorted. If the Sorted property is False (default), then the elements will be stored in the order they are added. If Sorted is True, items will be stored in ascending alphabetical order by subscripts.
 +
 +
If you attempt to reference an element by a nonexistent subscript you will get an error in form of a Delphi exception. Don’t forget that M syntax dictates that all strings must be surrounded by double quotes. So, if your goal is to pass a string subscripted array of strings using TMult as a parameter to an RPC on the VistA M Server, don’t forget to surround each of the subscripts and their associated values with double quotes ("). Otherwise, M will assume that you’re passing a list of variables and will attempt to reference them, which is probably not what you want.

Revision as of 21:42, 3 July 2015

RPC Broker Help Home

TMult Class

TRPCB Unit

Description The TMult class is used whenever a list of multiple values needs to be passed to a remote procedure call (RPC) in a single parameter. The Mult property of a parameter is of TMult type. The information put in the TMult variable is really stored in a TStringList, but the access methods (used to read and write) take strings as subscripts and provide the illusion of a string-subscripted array.

It’s important to note that items in a TMult class may or may not be sorted. If the Sorted property is False (default), then the elements will be stored in the order they are added. If Sorted is True, items will be stored in ascending alphabetical order by subscripts.

If you attempt to reference an element by a nonexistent subscript you will get an error in form of a Delphi exception. Don’t forget that M syntax dictates that all strings must be surrounded by double quotes. So, if your goal is to pass a string subscripted array of strings using TMult as a parameter to an RPC on the VistA M Server, don’t forget to surround each of the subscripts and their associated values with double quotes ("). Otherwise, M will assume that you’re passing a list of variables and will attempt to reference them, which is probably not what you want.