RPC HELP TRPCBroker Results

From VistApedia
Revision as of 18:58, 4 July 2015 by Kdtop (talk | contribs) (Created page with "<h2>Results Property</h2> Example <h3>Applies to</h3> TRPCBroker component <h3>Declaration</h3> prop...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Results Property

Example

Applies to

   TRPCBroker component

Declaration

   property Results: Tstrings;


Description

The Results design-time property contains the results of a Call method. In the case where the RPC returns a single value, it will be returned in Results[0]. If a call returns a list of values, the Results property will be filled in the order the list collates on the VistA M Server. The Results property can only contain values of array elements – subscripts are not returned.

For example:

On the VistA M Server, the M routine constructs the list in the following sequence:

   S LIST("CCC")="First"
   S LIST(1)="Second"
   S LIST("AAA")="Third"
   S LIST(2)="Fourth"

Before Broker returns the list to the client, M will re-sort it in alphabetical order:

   LIST(1)="Second"
   LIST(2)="Fourth"
   LIST("AAA")="Third"
   LIST("CCC")="First"

On the client, the Results property will contain the following:

   brkrRPCBroker1.Results[0]=Second
   brkrRPCBroker1.Results[1]=Fourth
   brkrRPCBroker1.Results[2]=Third
   brkrRPCBroker1.Results[3]=First