RPC HELP TRPCBroker Results

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