> ## 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 22: Creating a Portions element

> Extract the number of servings with a Portions Character String element whose alphabet, character count, and offsets tie it to the Serves element.

To create the Portions element:

1. Create an element of type [Character String](/flexi-capture/fls/template/character-chain) and name it **Portions**.
2. Click the Character String tab.
3. Set the required alphabet. Judging by the test images, the alphabet includes all the digits and the letters "T", "t", "O", and "o".
4. Set the Percentage of alphabet characters to 1.
5. Clear the Allow embedded hypotheses box.
6. Set the Percentage of non-alphabet characters to 20.
7. In the Character count field, specify this fuzzy range `{0, 1, 10, 15}`. This interval is an estimate of the length of the character string. Assume that the number of characters may be from 1 to 10. Any hypotheses outside this range will be penalized.
8. Click the Relations tab.
9. Since the number of servings is always located to the right of the word "Serves" and the distance between the right boundary of the word "Serves" and the right boundary of the number cannot exceed 200 dots, specify the following search constraints:
   * Right of the **Serves** element, Offset = 0
   * Left of the **Serves** element, Offset = -200, Reference boundary = right
10. Since the number of servings is always written on the same level as the word **Serves**, add the following search constraints:

* Above the **Serves** element, Offset = -50
* Below the **Serves** element, Offset = -50
