> ## 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 8: Specifying the order in which the field Recipe # and the name for the recipe must be detected

> Plan the search order for the Recipe # field and the unnamed recipe name field so the FlexiLayout can tell two closely spaced, similar fields apart.

Usually fields are detected via their names, but not all the fields on the documents have names. For example, the field containing the name of the recipe has no name. Therefore, a different approach must be used to detect this field.

The most obvious solution is to tell the program that the recipe name is the object that is closest to the form’s heading. But if you look at test image 6, you will see that on this image the closest field is **Recipe #:**. Sometimes it is possible to specify additional search constraints which help the program to distinguish between the two fields, but in this particular case it is very difficult to differentiate between the two fields — the recipe name and the **Recipe #:** field are located very close to each other and have similar structures:

1. The name **Recipe #:** and the field itself are located on the same level. The field may contain the same characters that may be used in the recipe name.
2. You cannot be sure that the text in the recipe name will always be longer than the name **Recipe #:** and its field.

Note, however, that pre-recognition consistently detects the name **Recipe #:** on all the test images. This means that you can tell the program to look for **Recipe #:** first. Then the program will look for the recipe name: the program must look for an object that is closest to the document heading, but which is NOT **Recipe #:** (which will have been detected by then).
