| Contents: | Main | Chapter | See Also: | Getting Started Manual | Advanced User Manual | |||
| Reference Type | Category | ICR # |
|---|---|---|
| Supported | Database Server (DBS) | 2053 |
The WP^DIE API files a single WORD-PROCESSING field.
WP^DIE(file,iens,field[,flags],wp_root[,msg_root])
| 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. |
|
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.
The following call files the data into Field #4 of (fictitious) 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.
Figure 179: WP^DIE API—Example: Input
>D WP^DIE(16200,"606,",4,"KA","^TMP($J,""WP"")")
In this example, the word-processing text must be located at:
Figure 180: WP^DIE API—Example: Word-Processing Text Location 1
^TMP($J,"WP",1,0) =Line 1
^TMP($J,"WP",2,0) =Line 2
...etc.
Or:
Figure 181: WP^DIE API—Example: Word-Processing Text Location 2
^TMP($J,"WP",1) =Line 1
^TMP($J,"WP",2) =Line 2
...etc.
In addition to errors indicating that input parameters are missing or incorrect and that the file, field, or entry does not exist, Table 60 lists the possible error codes returned with the WP^DIE API:
Table 60: WP^DIE API—Error Codes Returned
| Code | Description |
|---|---|
| 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: May 2026