> ## 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 17: Create a CookingTime element

> Detect the cooking time digits with a CookingTime Character String element constrained to sit left of and level with the CookingTimeHeader element.

The cooking time is a short string of digits, so define it as a [Character String](/flexi-capture/fls/template/character-chain) element.

<Steps>
  <Step title="Create the Character String element">
    Create an element of type **Character String** and name it **CookingTime**.
  </Step>

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

  <Step title="Set the alphabet">
    In the test images, the alphabet includes only digits. To set it, click **Add...** and select the digits in the **Add New Alphabet** dialog box.
  </Step>

  <Step title="Set the percentage of alphabet characters">
    In the **Percentage of alphabet characters** field, enter 1.
  </Step>

  <Step title="Disable embedded hypotheses">
    Clear the **Allow embedded hypotheses** check box.
  </Step>

  <Step title="Set the percentage of non-alphabet characters">
    In the **Percentage of non-alphabet characters** field, set the maximum to 10%.
  </Step>

  <Step title="Set the character count">
    In the **Character count** field, specify this fuzzy range: `{0, 1, 3, 4}`. This range estimates the string length, assuming the string is 1 to 3 characters long. Any hypotheses outside it are penalized.
  </Step>

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

  <Step title="Constrain the horizontal position">
    The cooking time always appears to the left of the time units, no more than 100 dots away. Add these relations relative to the **CookingTimeHeader** element:

    * **Left of**, **Offset** = 0
    * **Right of** the left boundary, **Offset** = -100, **Reference boundary** = **Left**
  </Step>

  <Step title="Constrain the vertical position">
    The cooking time is always on the same level as the time units. Add these relations relative to the **CookingTimeHeader** element:

    * **Above**, **Offset** = -20, **Reference boundary** = **Bottom**
    * **Below**, **Offset** = -20, **Reference boundary** = **Top**
  </Step>
</Steps>
