RPC HELP Tutorial Step 9

From VistApedia
Jump to: navigation, search

RPC Broker Help Home

Tutorial Home

Tutorial: Step 9 -- RPC to Retrieve Terminal Types

Now that you've created an RPC-compatible routine to retrieve fields from a terminal type record (Step 8), you can go ahead and create the RPC itself.

To create an RPC that uses the TERMENT^ZxxxTT routine:

Using VA FileMan, create a new RPC entry in the REMOTE PROCEDURE file. Set up the RPC as follows:

   NAME: ZxxxTT RETRIEVE
   TAG: TERMENT
   ROUTINE: ZxxxTT
   RETURN VALUE TYPE: ARRAY
   DESCRIPTION: Used in RPC Broker tutorial.
   INPUT PARAMETER: IEN 
     PARAMETER TYPE: LITERAL

The RPC's RETURN VALUE TYPE is set to ARRAY. This means that the RPC expects a return value that contains results nodes, each subscripted only at the first subscript level.

The WORD WRAP ON setting does not affect RPCs whose RETURN VALUE TYPE is ARRAY.

The additional input parameter needed to pass in a record IEN is documented in the INPUT PARAMETER multiple. Its parameter type is LITERAL, which is appropriate when being passed the numeric value of an IEN.

This RPC can now be called from a Delphi-based application, through the TRPCBroker component.

PREV: Step 8: Routine to Retrieve Terminal Types

NEXT: Step 10: Call ZxxxRETRIEVE RPC