> ## 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: Create 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.

The **Serves** element locates the word `Serves`.

<Steps>
  <Step title="Create the Static Text element">
    Create an element of type **Static Text** and name it **Serves**.
  </Step>

  <Step title="Open the Static Text tab">
    Click the **Static Text** tab.
  </Step>

  <Step title="Set the search text">
    In the **Search text** field, type `Serves`.
  </Step>

  <Step title="Set the maximum error percentage">
    Set **Max error percentage** to 20.
  </Step>

  <Step title="Open the Advanced tab">
    Click the **Advanced** tab.
  </Step>

  <Step title="Add a pre-search relation">
    In the **Advanced pre-search relations** field, add an [additional search constraint](/flexi-capture/fls/template/advanced-constraints) that looks for the object closest to the cooking time. In the [FlexiLayout language](/flexi-capture/fls/code/general-code), write it as `Nearest: SearchElements.Cooking.CookingTimeHeader;`.

    <Tip>
      You can also specify this constraint via the FlexiLayout Studio graphical user interface. Click the **Relations** tab, select **Nearest**, and in the **To** drop-down list select **Element**, and then specify **CookingTimeHeader** as the **Reference element**.
    </Tip>
  </Step>
</Steps>
