Get Multiple Records
Execute a query and retrieve multiple records from a table
Get Multiple Records
Execute a query and retrieve multiple records from a table based on your search criteria. Use this when you need to find and process multiple records at once.
Technical Name: MultipleRecordFetchMDataFunc
Properties
- Execution Mode: SYNC
- Type: NATIVE
- Category: CRUD Operations
- Function ID:
9e8cea51-9784-4df7-a100-db395bd84916
Input Schema
Required Parameters
| Parameter | Type | Description |
|---|---|---|
queryMaster | object | Query configuration object for building the SQL query |
[Image placeholder: MultipleRecordFetchMData function configuration]
Input Example
{
"queryMaster": {
"mobjectId": "3f9a1ea8-5d9a-4f2b-a8f6-8f6b5d9a1ea9",
"filters": [
{
"field": "status",
"operator": "equals",
"value": "Active"
}
],
"fields": ["id", "name", "email", "status"],
"orderBy": {
"field": "createdAt",
"direction": "desc"
},
"limit": 100
}
}Query Master Configuration
The queryMaster object supports the following properties:
| Property | Type | Description |
|---|---|---|
mobjectId | string (uuid) | The Object to query |
filters | array | Array of filter conditions |
fields | array | Fields to return in the result |
orderBy | object | Sort configuration |
limit | integer | Maximum number of records to return |
Filter Operators
Supported operators in filter conditions:
equals- Exact matchnotEquals- Not equal tocontains- Contains substringstartsWith- Starts with valueendsWith- Ends with valuegreaterThan- Greater thanlessThan- Less thanin- Value in arrayisNull- Field is nullisNotNull- Field is not null
[Image placeholder: Query builder interface]
Output Schema
| Field | Type | Description |
|---|---|---|
dataList | array | List of query result records |
sql | string | The SQL query that was executed |
Each object in the dataList array contains the requested fields from the query.
Output Example
{
"dataList": [
{
"id": "7f8a2ea8-6d9a-5f3b-b9f7-9f7b6d9a2eb1",
"name": "John Doe",
"email": "john@example.com",
"status": "Active"
},
{
"id": "8g9b3fb9-7e0b-6g4c-c0g8-0g8c7e0b3fc2",
"name": "Jane Smith",
"email": "jane@example.com",
"status": "Active"
}
],
"sql": "SELECT id, name, email, status FROM customer WHERE status = 'Active' ORDER BY createdAt DESC LIMIT 100"
}[Image placeholder: Multiple records output visualization]
Use Cases
Fetch All Active Records
Retrieve all active records from a table:
{
"queryMaster": {
"mobjectId": "customer-mobject-id",
"filters": [
{
"field": "status",
"operator": "equals",
"value": "Active"
}
],
"orderBy": {
"field": "name",
"direction": "asc"
},
"limit": 1000
}
}Fetch Records by Date Range
Find records within a date range:
{
"queryMaster": {
"mobjectId": "order-mobject-id",
"filters": [
{
"field": "createdAt",
"operator": "greaterThanOrEquals",
"value": "2024-01-01"
},
{
"field": "createdAt",
"operator": "lessThanOrEquals",
"value": "2024-01-31"
}
],
"fields": ["id", "orderNumber", "totalAmount", "status"],
"orderBy": {
"field": "createdAt",
"direction": "desc"
}
}
}Process Records in Loop
Fetch multiple records and process them:
Start → MultipleRecordFetchMData → ForEach(ProcessRecord) → End[Image placeholder: Workflow example]
Field Resolution
The function automatically resolves:
- Picklist values - Converts picklist IDs to display names
- External data sources - Resolves references to related records
Error Handling
No Records Found
When no records match the query:
{
"dataList": [],
"sql": "SELECT id, name FROM customer WHERE status = 'Inactive'"
}Query Error
When the query fails:
{
"error": "Error executing MultipleRecordFetchMDataFunc: Invalid field name"
}Best Practices
- Use limit to control the number of records returned
- Specify required fields to minimize data transfer
- Use indexed fields in filters for better performance
- Order results for consistent processing
- Handle empty results gracefully in your workflow
Related Functions
- Get Single Record - Fetch a single record
- Bulk Insert Records - Insert multiple records
- Loop Through Items - Process multiple records in a loop