VA FileMan V. 22.0 Programmer Manual Banner


 

Main Chapter Getting Started Manual Advanced User Manual

Database Server (DBS) API


22.2BUILDNEW^DIBTED: Create a new SORT Template

This entry point will silently create a sort template.


Format
DO BUILDNEW^DIBTED(OUT,FILE,ARRAY,NAME)
Input Parameters
OUT(Required) Call-by-reference variable for return value.
FILE (Required) File number. 
ARRAY

(Required) Closed-root name of a numbered array of text that looks like the dialog used to build a SORT TEMPLATE, as in the FileMan TEMPLATE EDIT Option.

NAME

(Optional) The name of the new SORT TEMPLATE being created.

Output

The internal number of the SORT TEMPLATE created in File .401, concatenated with its NAME, as in the return value "Y" from ^DIC.  

-1 if error.

Example

Create a SORT TEMPLATE named 'ZZTEST' that will sort the PTF file  (File 45) by STATUS and within STATUS by PATIENT.

GFT(1)="SORT BY: @STATUS"
GFT(2)="From: 0"
GFT(3)="To: 1"
GFT(4)=" Do NOT ask range of values "
GFT(5)="   WITHIN STATUS, SORT BY: PATIENT"
GFT(6)="   From: "
GFT(7)="   To:"

. . . .
DO BUILDNEW^DIBTED(.GFTOUT,45,"GFT","ZZTEST")

GFTOUT=7889^ZZTEST^1



Error Codes Returned
-1 LINE n OF TEMPLATE COULD NOT BE PROCESSED

 


Reviewed/Updated: October 2016