Skip to main content
Names of elements, constants and variables can be used only in certain sections of a program. This is called the “scope” of the name. The scope of a variable also determines its lifetime. The name of a variable declared in the Region expression, Advanced pre-search relations or Advanced post-search relations section is accessible within that section, and only after the point of declaration. A name declared within a block is accessible only within that block and the blocks enclosed by it, and only after the point of declaration:

Access to element hypotheses

Element hypotheses can be accessed through the names of the elements. The section you are in determines which hypotheses you can access: The code in the Advanced pre-search relations section is executed separately for each hypothesis, independently of the hypotheses located on other branches of the tree of hypotheses. This means that when FlexiLayout Studio executes the code of a particular section of an element description, it can access only one hypothesis for each superordinate element, namely the hypothesis located on the same branch. Element hypotheses and their properties are accessed in read-only mode.

Full and shortcut element names

Hypotheses for a superordinate element are called by the full name of the element, for example: SearchObjects.Group1.Group2.FirstItem. When accessing one subelement of a group from another subelement, you need not specify the name of the group. For example, in the Advanced… sections of the element SearchObjects.Group1.Group2.SecondItem, you can call the element SearchObjects.Group1.Group2.FirstItem in one of the following ways: SearchObjects.Group1.Group2.FirstItem, Group1.Group2.FirstItem, Group2.FirstItem, FirstItem. The shortcut name will always refer to the most nested element. Suppose you have the following tree of elements:
If you are in SearchElements.Group1.SecondItem and use the name FirstItem, you will call the SearchElements.Group1.FirstItem element, and not the SearchElements.FirstItem element.