--- title: "copy field by name()" slug: "basic-copy-field-by-name" updated: 2026-08-11T07:44:26Z published: 2026-08-11T07:44:26Z canonical: "docs.lobstersoftware.com/basic-copy-field-by-name" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # copy field by name() 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:** 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](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/structure_copy_field_by_name-version-1-modificationdate-1750153051116-api-v2.png) The field "function_test" contains the following function chain: ```plaintext 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 (: ) | 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 [HTTP (Input agent)](/v1/docs/en/profiles--entry-tab-2-webservice) (subsection 'Handling HTTP Multipart Messages') for details. | Function chains in Lobster consist of sequences of functions that are used to define conditions or to process data. The possibility of encapsulating them in macros and reusing them allows for central maintenance and compact use. Changes to a macro affect all profiles with that macro. Function chains can be determined both system-wide and client-specific.