--- title: "mark for future value()" slug: "basic-mark-value" updated: 2026-08-12T07:50:13Z published: 2026-08-12T07:50:13Z canonical: "docs.lobstersoftware.com/basic-mark-value" --- > ## 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. # mark for future value() This function places a marker **a** on a target field. Later this marker can be replaced with an actual value with the function [replace marked value()](/v1/docs/en/basic-resolve-value). Marking and replacing only works within a record. With the start of a new record, the markings are removed and replaced with an empty *f*lag. It is recommended not to use the function in a Function chain, but to place it alone on a field. If the field is used as a sorting field of a node, the sorting takes place after the substitution with the actual value. ## Parameters | Parameter | Description | | --- | --- | | a | Name of the marker. | ## Example It is possible to use values that are only calculated in the future. This can be done with the aid of two functions. ### Create a new profile ![images/download/attachments/201686786/882-version-1-modificationdate-1750240526206-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/882-version-1-modificationdate-1750240526206-api-v2.png) First, we create a simple CSV mapping profile (line separator *NL* and field separator semicolon), containing a source structure for a header record and several item records. Additionally, we want to calculate the number of items and show it in the target structure field *number_of_items*. Following our simple input data. ```plaintext H;4711;Lobster I;A-1;Article 1 I;A-2;Article 2 I;A-3;Article 3 ``` Please use the record match code *H* for the header node and *I* for the item node. If you have finished the source structure, you can simply create the target structure by clicking on the *1:1* button. The only thing left to do now is to create the target field *number_of_items* in node *Header* and the calculation field *calc_number_items* in node *Item*. ### Create variable Create a new variable of type *Integer* and the name *var__COUNT_ITEMS.* ### Calculate number of items ![images/download/attachments/201686786/880-version-1-modificationdate-1750240526199-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/880-version-1-modificationdate-1750240526199-api-v2.png) Use the function "calculate and save variable()" on calculation field "calc_number_items" and set it like in the screenshot above. This will increment the variable "var__COUNT_ITEMS" for each iteration of node "Item" by "1". ### Write number of items in header record ![images/download/attachments/201686786/883-version-1-modificationdate-1750240526197-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/883-version-1-modificationdate-1750240526197-api-v2.png) To be able to write the final value of variable *var__COUNT_ITEMS* in field *number_of_items*, we need to use the function "mark for future value(a)". What is happening here? The node *Header* is processed before the node *Item*. At this point in time, we do not have the final value of variable *var__COUNT_ITEMS*. For that reason, we use the future value *item_counter* in field *number_of_items*. ### Write number of items ![images/download/attachments/201686786/884-version-1-modificationdate-1750240526196-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/884-version-1-modificationdate-1750240526196-api-v2.png) To fill the future value *item_counter*, after all the items have been processed, we create a new node (below node *Item*) with a calculation field *fill_marked_field*. This field uses the function *"*replace marked value(a,b)". What is happening here? Node *End* is processed at the end of the mapping. The function "replace marked value(a,b)" replaces the future value *item_counter* with the final value of variable *var__COUNT_ITEMS* (parameter **b**). ### Test ![images/download/attachments/201686786/881-version-1-modificationdate-1750240526201-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/881-version-1-modificationdate-1750240526201-api-v2.png) If you did everything correctly, a test should show you the result shown in the screenshot above. ### The following is not possible - The use of target fields using the function mark for future value(a) as parameters in functions is prevented to avoid complex backtracking. - Replacements are only done in the current record! Values cannot be replaced over several records. ### Empty values If function "replace marked value()" is not executed, the Empty Flag is set for field "number_of_items". ### Example profile [Profile-Future_values.pak](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/Profile-Future_values.pak) 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.