WRITEFIELDS
Usage
TIBCO iProcess Workspace (Windows)
Write current values of selected fields to a file.
Syntax
WRITEFIELDS (filename, fieldlist, excluding, copy, destfmt)
where:
| • | filename is a text string specifying the output file as either a pathname, a simple filename or the full path of the directory for the file, in which case a unique filename will be generated (and returned by the function). |
The following environment variables may be used in a pathname:
| — | TEMP, the temporary directory on the client. |
| — | HOME, the user’s queue directory on the server, SWDIR\queues\username. |
| • | fieldlist is a text string specifying the list of fields to be written, separated by commas. (Wildcard characters * and ? may be included.) |
| • | excluding is a text string specifying the list of fields not to be written, even though selected in fieldlist. |
| • | copy is one of the following numeric values, specifying whether to make copies of memos and/or attachment files: |
|
Value |
Files to copy |
|
0 |
Copy neither |
|
1 |
Copy memos |
|
2 |
Copy attachments |
|
3 |
Copy both memos and attachments |
| • | destfmt is one of the following numeric values, specifying the destination format of the output file filename: |
|
Value |
Destination format |
|
0 |
Current client |
|
1 |
UNIX |
|
3 |
DOS type |
Returns
A text string containing the full pathname of the output file, or SW_NA on error.
The output file is a text file in abox format - each line consists of the fieldname, followed by a comma, followed by the field value in characters. Passwords are not written.
Example
TIBCO iProcess Modeler:
This (Windows) example writes the contents of all fields excluding (SW_*) system fields with DOS line terminators to a computer-generated filename in the directory specified by the TEMP environment variable, and puts the full path of the output file in text field abox. Any memos and attachment files will be copied to the same directory and their pathnames written to the output file.
abox := WRITEFIELDS("%TEMP%", "*", "SW_*", 3, 3)
TIBCO Business Studio:
abox = IPEEnvironmentUtil.WRITEFIELDS("%TEMP%", "*", "SW_*", 3, 3);