--- title: "Lists" slug: "lists" updated: 2024-06-04T12:44:35Z published: 2024-06-04T12:44:35Z canonical: "help.foxbase.de/lists" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.foxbase.de/llms.txt > Use this file to discover all available pages before exploring further. # Lists The navigation point **Lists** contains elements that enable the creation and editing of objects with several articles (including products). ![](https://cdn.document360.io/28f4eaf7-083b-49e6-bc8f-1a791499f2fe/Images/Documentation/image(11).png) - **list**: The operator is used to create a data collection. The elements in the list can contain any values (e.g. numbers / text / answers / questions / expressions). - **index**: Allows you to obtain the index of a specific element in the list. The numbering of the elements in the list starts with '0'. - **length**: Is used together with the **list** element and indicates the number of elements in the list. - **append**: Is used to combine several lists with each other. > [!WARNING] > ⚠️ **Note on the configuration of the following examples** > > The following examples show exemplary rules. In order to display the result of a rule (i.e. the content of a created field) on the result page, the field must always also be configured via the **Result Page** workbench navigation item. **For the sake of clarity, we do not show this step in the examples.** Please refer to the related article. --- ### Example 1: Using list to check the selection of specific answers In the example, the system checks whether at least one of the following answers has been selected: 1 week / 2 weeks / 4 weeks / 8 weeks. The logic is as follows: - The values of the answers are added to the list - **isAnySeleceted** is a variable that assumes the value **true** if one of the specified answers has been selected. Otherwise it assumes the value "false". - A **for each loop** is used to run through all the values in the list. Within this loop, an 'if' condition is applied to each item in the list (one at a time) to check whether the answer has been selected from the list. - If at least one answer has been selected from the list, the variable **isAnySeleceted** receives the value **true** and can be used later within the "if" condition (if **isAnySeleceted** then do ...). ![](https://cdn.document360.io/28f4eaf7-083b-49e6-bc8f-1a791499f2fe/Images/Documentation/image(12).png) In principle, this logic could also be configured without the lists element. However, this would make the structure much more complex: ![](https://cdn.document360.io/28f4eaf7-083b-49e6-bc8f-1a791499f2fe/Images/Documentation/image(13).png) --- ### Example 2: Use of index Exemplary configuration: ![](https://cdn.document360.io/28f4eaf7-083b-49e6-bc8f-1a791499f2fe/Images/Documentation/image(15).png) In this example, we have a list with [1, 2, 3] elements. Each element has its own index, starting at 0: ![](https://cdn.document360.io/28f4eaf7-083b-49e6-bc8f-1a791499f2fe/Images/Documentation/image(16).png) Here we want to select an element with the index 0 from the list [1, 2, 3]. The table above shows an element and the corresponding index for each element. So if we select element 0 of the list, we get the value "1" (the first value of the list). --- ### Example 3: Use of length Exemplary configuration in combination with the **list** element: ![](https://cdn.document360.io/28f4eaf7-083b-49e6-bc8f-1a791499f2fe/Images/Documentation/image(17).png) In the example, 3 is played, as there are 3 elements in the list '1,2,3'. --- ### Example 4: Using append Exemplary configuration in combination with the **list** element: ![](https://cdn.document360.io/28f4eaf7-083b-49e6-bc8f-1a791499f2fe/Images/Documentation/image(56).png) In this example, two lists are combined. The result is a list with the five elements [A, B, C, D, E].