RPC HELP BROKER RTRNFMT XWBLIB

From VistApedia
Jump to: navigation, search

RPC Broker Help Home

$$RTRNFMT^XWBLIB

Use this function in the M code called by an RPC to change the return value type that the RPC will return on the fly.

Format

   $$RTRNFMT^XWBLIB(type, wrap)

Input

  • type: Set this to the RETURN VALUE TYPE to change the RPC's setting to. You can set it to one of the following numeric or free text values:
    • numeric -- free text
    • 1 -- SINGLE VALUE
    • 2 -- ARRAY
    • 3 -- WORD PROCESSING
    • 4 -- GLOBAL ARRAY
    • 5 -- FOR GLOBAL INSTANCE
  • wrap: Set to 1 to set the RPC's WORD WRAP ON setting to True; set to 0 to set the RPC's WORD WRAP ON setting to False.

Output

Return Value 0 if the return value type could not be changed; otherwise, the numeric code representing the return value type that the RPC is changed to.

Example

   IF '$$RTRNFMT^XWBLIB("ARRAY",1) DO
   . ; branch to code if can't change RPC type