Search one data record
Function: Search one data record
This action helps you find a single item from your database that matches specific criteria. You can define various filters to narrow down your search, specify which fields you want to retrieve, and even set a sorting order to ensure you get the most relevant record.
Input,
- Data format:
- Description: Choose the type of data you want to search within (e.g., "Customers", "Products", "Orders").
- Type: A specific type of data (like 'Products' or 'Users')
- Required: Yes
- Filters:
- Description: Add rules to filter your data. All filters in this section must be true for a record to be found (AND relationship).
- Type: A list of filter rules. Each rule consists of:
- Attribute: Select a specific field from your chosen Data format (e.g., "Product Name", "Price").
- Operator: Choose how the attribute should be compared (e.g., "Equal", "Greater than", "Contains", "Is null").
- Value: Provide the value to compare against. This field is hidden if the operator is "Is null" or "Is not null".
- Filters (OR):
- Description: Add additional rules to filter your data. If any of the filters in this section are true, the record will be considered (OR relationship). These OR filters are applied after the main "Filters" (AND) section.
- Type: A list of filter rules. Each rule consists of:
- Attribute: Select a specific field from your chosen Data format.
- Operator: Choose how the attribute should be compared.
- Value: Provide the value to compare against. This field is hidden if the operator is "Is null" or "Is not null".
- Attributes:
- Description: Specify which specific fields you want to retrieve from the found data record. If left empty, all fields of the data record will be returned.
- Type: A list of attributes. Each attribute is:
- Attribute: Select a specific field from your chosen Data format.
- Sort by:
- Description: Define how the results should be ordered before the first record is selected. You can add multiple sorting rules.
- Type: A list of sorting rules. Each rule consists of:
- Attribute: Select a specific field from your chosen Data format to sort by.
- Order: Choose the sorting direction: "Ascending" (A-Z, 0-9) or "Descending" (Z-A, 9-0).
Output,
- Found data:
- Description: The single data record that was found based on your criteria. If no record matches, this will be empty.
- Type: The retrieved data record
- Default Variable Name:
FOUND_DATA
Execution Flow,
Real-Life Examples,
Example 1: Find a specific product by its name
- Goal: Locate a product named "Wireless Mouse X1" from your "Products" list.
- Inputs:
- Data format:
Products - Filters:
- Add filter:
- Attribute:
Product Name - Operator:
Equal - Value:
Wireless Mouse X1
- Attribute:
- Add filter:
- Filters (OR): (Leave empty)
- Attributes: (Leave empty to get all product details)
- Sort by: (Leave empty)
- Data format:
- Result: The action finds the product "Wireless Mouse X1" and stores all its details (like price, description, stock) in a variable named
FOUND_DATA.
Example 2: Find an active user from the Marketing department, sorted by last name
- Goal: Get the details of the first active user who belongs to the "Marketing" department, prioritizing users with last names starting earlier in the alphabet.
- Inputs:
- Data format:
Users - Filters:
- Add filter:
- Attribute:
Department - Operator:
Equal - Value:
Marketing
- Attribute:
- Add filter:
- Attribute:
Status - Operator:
Equal - Value:
Active
- Attribute:
- Add filter:
- Filters (OR): (Leave empty)
- Attributes: (Leave empty)
- Sort by:
- Add sorting rule:
- Attribute:
Last Name - Order:
Ascending
- Attribute:
- Add sorting rule:
- Data format:
- Result: The action finds the active user from the Marketing department whose last name comes first alphabetically and stores their full user profile in the
FOUND_DATAvariable.
Example 3: Get the ID and status of an order that is either 'Pending' or 'Processing'
- Goal: Retrieve the Order ID and Status for any order that is currently in a 'Pending' or 'Processing' state.
- Inputs:
- Data format:
Orders - Filters: (Leave empty)
- Filters (OR):
- Add filter:
- Attribute:
Order Status - Operator:
Equal - Value:
Pending
- Attribute:
- Add filter:
- Attribute:
Order Status - Operator:
Equal - Value:
Processing
- Attribute:
- Add filter:
- Attributes:
- Add attribute:
Order ID - Add attribute:
Order Status
- Add attribute:
- Sort by: (Leave empty)
- Data format:
- Result: The action finds the first order that is either 'Pending' or 'Processing' and stores only its
Order IDandOrder Statusin theFOUND_DATAvariable.