> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sample 2. Step 21: Creating a Serves element

> Pinpoint the word Serves with a Static Text element, applying a Nearest pre-search relation to the CookingTimeHeader element to avoid false matches.

To create the Serves element:

1. Create an element of type **Static Text** and name it **Serves**.
2. Click the Static Text tab.
3. In the Search text field, type the text to search for: **Serves**.
4. Set Max error percentage to 20.
5. Click the Advanced tab.
6. In the Advanced pre-search relations field, specify an [additional search constraint](/flexi-capture/fls/template/advanced-constraints): Look for the object closest to the cooking time. In the [FlexiLayout language](/flexi-capture/fls/code/general-code) this must be written as follows:\
   `Nearest: SearchElements.Cooking.CookingTimeHeader;`

   <Tip>
     The same constraint can also be specified via the program’s graphical user interface. Click the Relations tab, select Nearest, and in the To drop-down list select Element and specify **CookingTimeHeader** as the Reference element.
   </Tip>
