copy field by name()

Prev Next

Returns the value of the source structure field (or the value of a variable that has not been created), whose name is given via parameter "a". See example below.

Important note: Only source structure fields in the same context can be resolved (i.e. the node of the target structure field containing this function must have a path to the node of the source structure field). Always use the options "relative path" and "normal data mapper".

Parameters

Parameter

Description

a

Variable or position in a function chain that contains the name of the source structure field (or directly the name of an undefined variable). See example below.

Examples

Given is a source structure field with the name "sourcefield", which has the assigned value "4711".

The variable "var_FIELDNAME1" shall contain the value "sourcefield", the variable "var_FIELDNAME2" shall contain the value "NonExistingSource".

images/download/attachments/201686364/structure_copy_field_by_name-version-1-modificationdate-1750153051116-api-v2.png

The field "function_test" contains the following function chain:

copy(field/value/variable)
a 	Wert: 	sourcefield
 
copy(field/value/variable)
a 	Wert: 	NonExistingSource
 
copy(field/value/variable)
a 	Wert: 	var_FIELDNAME1
 
copy(field/value/variable)
a 	Wert: 	var_FIELDNAME2
 
copy(field/value/variable)
a 	Wert: 	

We get the following results for the function at position 5:

Parameter a (<parameter type>: <parameter value>)

Result

Variable: var_FIELDNAME1

4711

Variable: var_FIELDNAME2

Termination of the function with an error.

Result: 1

4711

Result: 2

Termination of the function with an error.

Result: 3

Termination of the function with an error.

Result: 4

Termination of the function with an error.

Value: MSG_CALL_HTTP_MULTIPART1_VALUE

Name of the variable (even if it was not created). See section HTTP (Input Agent) (subsection 'Handling HTTP Multipart Messages') for details.