VA FileMan V. 22.0 Programmer Manual Banner


 

Main Chapter Getting Started Manual Advanced User Manual

Database Server (DBS) API


WP^DIE( ): Word Processing Filer

This procedure files a single word processing field.

Format
WP^DIE(FILE,IENS,FIELD,FLAGS,wp_root,msg_root)
Input Parameters
FILE

(Required) File or subfile number.

IENS

(Required) Standard IENS indicating internal entry numbers.

FIELD

(Required) Field number of the word processing field into which data is being filed.

FLAGS

(Optional) Flags to control processing. The possible values are:

A Append new word processing text to the current word processing data. If this flag is not sent, the current contents of the word processing field are completely erased before the new word processing data is filed.
K LocK the entry or subentry before changing the word processing data.
WP_ROOT

(Required) The root of the array that contains the word processing data to be filed. The data must be in nodes descendent from this root. The subscripts of the nodes below the WP_ROOT must be positive numbers. The subscripts do not have to be integers, and there can be gaps in the sequence. The word processing text must be in these nodes or in the 0-node descendent from these nodes. To delete the word processing field, set WP_ROOT equal to "@".

MSG_ROOT

(Optional) Root into which errors are put. If this parameter is not passed, these arrays are put into nodes descendent from ^TMP.

Output

The typical result of this call is the updating of the database with new word processing data. If the call fails, an error message is returned either in ^TMP or, if it is passed, descendent from MSG_ROOT.

Example

The following call files the data into Field #4 of File #16200 for record number 606. The entry is locked before filing and the new data is added to any word processing data that is already there.

    >D WP^DIE(16200,"606,",4,"KA","^TMP($J,""WP"")")

In this example, the word processing text must be located at:

    ^TMP($J,"WP",1,0) =Line 1
    ^TMP($J,"WP",2,0) =Line 2
        ...etc.

or at:

    ^TMP($J,"WP",1) =Line 1
    ^TMP($J,"WP",2) =Line 2
        ...etc.
Error Codes Returned

In addition to errors indicating that input parameters are missing or incorrect and that the file, field, or entry does not exist, this procedure can return the following error codes:

110 Lock could not be obtained because the entry was locked.
305 There is no data in the array identified by WP_ROOT.
726 The specified field is not a word processing field.

 


Reviewed/Updated: March 10, 2007