4D v16.3PROCESS 4D TAGS |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
PROCESS 4D TAGS
PROCESS 4D TAGS
The PROCESS 4D TAGS command causes the processing of 4D transformation tags contained in the inputTemplate parameter (field or variable of the BLOB or Text type) while (optionally) inserting value(s) using the param parameters and returns the result in outputResult. For a complete description of these tags, refer to the 4D Transformation Tags section. This command lets you execute a "template" type text containing tags and references to 4D expressions and/or variables, and to produce a result depending on the execution context and/or the values passed as parameters. Pass the data containing the tags to be processed in the inputTemplate parameter. This parameter can be a field or variable of the BLOB or Text type. The Text type is usually sufficient (parameters can receive up to 2 GB of text). Compatibility note: Beginning with version 12 of 4D, when you use BLOB type parameters, the command automatically considers that the character set used for BLOBs is MacRoman. For better efficiency, it is strongly recommended to use Text type parameters for which processing is carried out in Unicode mode. All the transformation tags of 4D are supported (4DTEXT, 4DHTML, 4DSCRIPT, 4DLOOP, 4DEVAL, etc.). Note: When using the 4DINCLUDE tag outside the framework of the Web server (Web process):
The PROCESS 4D TAGS command supports an indefinite number of param parameters that can be inserted into the executed code. As with project methods, these parameters can contain scalar values of varied types (text, date, time, longint, real, etc.). You can also use arrays, by means of array pointers. Inside the code processed by the 4D tags, these parameters can be accessed by means of standard arguments ($1, $2, etc.), just like in 4D methods 4D (see example). Compatibility note: In previous versions of 4D, local variables defined in the calling context could be accessed in the PROCESS 4D TAGS execution context in interpreted mode. Beginning with 4D v14 R4, this is not the case anymore. After command execution, the outputResult parameter receives the execution result of the inputTemplate parameter, along with the result of the processing of any 4D tags that it contains, when applicable. If inputTemplate does not contain any 4D tags, the contents of outputResult is identical to that of inputTemplate. Note: This command never calls the On Web Authentication database method. This example loads a 'template' type document, processes the tags it contains and then stores it: C_BLOB($Blob_x) This example generates a text using data of the arrays: ARRAY TEXT($array;2)
See also
|
PROPERTIES
Product: 4D HISTORY
Created: 4D 2004 ARTICLE USAGE
4D Language Reference ( 4D v16) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||