--- title: "Tuple search (Form designer)" slug: "frebehav-tuple-search" updated: 2026-05-04T12:25:47Z published: 2026-05-04T12:25:47Z canonical: "docs.lobstersoftware.com/frebehav-tuple-search" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Tuple search (Form designer) > [!NOTE] > The **Behavior type** [Tuple search (Form designer)](/v1/docs/en/frebehav-tuple-search) executes a configurable search in the **Lobster Data Platform/Orchestration** database (see also [Search API](/v1/docs/en/common-search-api)) and returns the search results as a data service to the **Actions on "true"**. This data service defines columns that match the [Projections](/v1/docs/en/core-i-search-projection) of the tuple search. ![images/download/attachments/189432335/image-2024-10-2_8-48-59-version-1-modificationdate-1727851739821-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-10-2_8-48-59-version-1-modificationdate-1727851739821-api-v2.png) - The **Configure search** button opens a dialog for search configuration. - With the option **Return first result** set, only the first match (if any) of the search is returned. Without the option, a list of all matches is returned. If an element is linked to this behavior type, which contains an object with properties and values, this data is provided to the context of the search as variables. For each data field specified for a child element, a variable bearing its name and value is created. > [!WARNING] > **IMPORTANT:** > > If at runtime a linked element cannot be validated (see [Validate element](/v1/docs/en/frebehav-validate) and [Validators](/v1/docs/en/frevalidators)), e.g. because required fields are not filled in, the search is not executed and the **Actions on "false"** apply. These actions receive element data (to include "invalid" inputs) from the linked element. If this element does not specify a data field, data of a parent level, if not the form itself, is provided. ## Using variables to access data of a linked element A portal shall present the matches of a tuple search in a [Data grid](/v1/docs/en/fre-data-grid-vo). The search should use input from a [Text field](/v1/docs/en/custom-custom-text-field) (here: "ID") as a parameter, to identify "relevant" data objects by an appropriate condition. ![images/download/attachments/189432335/image2020-3-27_11-44-49-version-1-modificationdate-1727851309400-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2020-3-27_11-44-49-version-1-modificationdate-1727851309400-api-v2.png) - In the form, a [Row layout](/v1/docs/en/fre-element-container-vo-row-layout) container "Search parameters" with data field `searchParams` is used as a parent element for the [Text field](/v1/docs/en/custom-custom-text-field) "ID" and further search parameters (t.b.d.). - **Data field** `searchId` is defined for the "ID" field. This results in the following data structure for the container "Search parameters": JSON output for the container "Search parameters". ```json { searchId: 0 } ``` [Text field](/v1/docs/en/custom-custom-text-field) "ID" is defined to **Restrict** input to "Big Integer (long)", since this value will later be matches against object "IDs" of that data type within the tuple search. Clicking the **Search** button triggers the [Tuple search (Form designer)](/v1/docs/en/frebehav-tuple-search) behaviour, which refers to the [Row layout](/v1/docs/en/fre-element-container-vo-row-layout) container **Search parameters** as a linked element in its configuration. At runtime, the value entered into [Text field](/v1/docs/en/custom-custom-text-field) "ID" is handed to the [Search API](/v1/docs/en/common-search-api) via a [Variable](/v1/docs/en/core-storage-value) named `searchId`: ![images/download/attachments/189432335/image2020-3-27_12-1-21-version-1-modificationdate-1727851309398-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2020-3-27_12-1-21-version-1-modificationdate-1727851309398-api-v2.png) The configuration of the tuple search itself is enabled by a dialog opened by clicking the **Configure search** button: ![images/download/attachments/189432335/image2020-3-27_12-10-23-version-1-modificationdate-1727851309395-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2020-3-27_12-10-23-version-1-modificationdate-1727851309395-api-v2.png) - First of all, the **Entity** must be selected to identify the type of object to search for. In our example, we are searching for a [Users](/v1/docs/en/base-user) object. - As [Projections](/v1/docs/en/core-i-search-projection) (which are only visible as nodes of the tree view in the screenshot above) the two properties "User name" `(username`) and "ID" (`id`) of the [Users](/v1/docs/en/base-user) object were selected to correspond with the [Data grid](/v1/docs/en/fre-data-grid-vo). - The screenshot shows the configuration for the **Where** condition, where a [Field restriction](/v1/docs/en/core-property-search) defines an exact match ("==") between field "ID" and the value of [Variable](/v1/docs/en/core-storage-value) `searchId` as a criterion. ![images/download/attachments/189432335/image-2024-10-24_9-43-11-version-1-modificationdate-1729755790942-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-10-24_9-43-11-version-1-modificationdate-1729755790942-api-v2.png) The configuration for **Actions on "true"** lists a [Grid: Fill](/v1/docs/en/freaction-fill-grid) action, which uses the [Data grid](/v1/docs/en/fre-data-grid-vo) "Search result" as a **Target element** for displaying the results of the [Tuple search (Form designer)](/v1/docs/en/frebehav-tuple-search). The columns in this [Data grid](/v1/docs/en/fre-data-grid-vo) must specify data field names matching the names of [Projections](/v1/docs/en/core-i-search-projection) of the search. Not all [Projections](/v1/docs/en/core-i-search-projection) must appear in the [Data grid](/v1/docs/en/fre-data-grid-vo). **NOTE:** Since the [Field restriction](/v1/docs/en/core-property-search) in our example specifies an exact match for the unique `id` of the [Users](/v1/docs/en/base-user) object, a maximum of only *one* match should appear in the [Data grid](/v1/docs/en/fre-data-grid-vo) in the existing configuration if read access exists for the "searched" user account.