Overview
The Query Records action is responsible for retrieving specific data from a database or data source based on predefined conditions or criteria.
This action allows workflows to access relevant information needed for further processing, analysis, or decision-making.
By specifying filters, sorting, or other parameters, this action ensures that only the most pertinent records are retrieved from the data set, optimizing the workflow for efficiency and accuracy.
It plays a critical role in gathering data to support business processes and dynamic content generation.
Let’s explore the screens that follow, after drag-n-drop of Query Records action on workflow canvas.
Config
Config Field | Description |
---|---|
Source Type | In this dropdown, you can select a source among various sources from which you want to query records. Note: By default, the Source Type is Object. Other options include Model and Variable. |
Note: Fields below this will be populated based on the Source Type one chooses. If Variable and Model are chosen, only one field of choosing specific model and variable will be populated. | |
Object | In this option, you can select the object from which you want to query records. The chosen object will define the source of data for your query. Note: Label of this field is dependent on Source Type chosen earlier. If chosen variable or model, label will be the same either variable or model as per selection. |
How many records to store? | In this option, you can specify the number of records to query from the selected object. You can choose to retrieve either a single record or multiple records based on your operational needs.
|
Fields | In this option, you can view and select fields from the object you have previously chosen. These fields represent the data points within the object that you can query for Note: This will be blank, if no object is chosen. |
Selected Fields | In this option, you can see selected fields by you which are querying for. |
Filters | This option enables user to filter records data from the selected object using AND and OR logical operators. These operators allow the user to create complex logic for querying records, ensuring that only the relevant data is retrieved. Reference: Filters |
Order By |
Reference: Order By |
Limit | It is used to specify the number of records to be queried in single query. |
Offset | To efficiently manage large result sets in a SOQL query, use the For example, you can display records 51–75, then jump to records 301–350. This approach allows you to retrieve and display specific subsets of data without processing the entire result set at once. |
Filters
Custom Logic for Multiple Filters
Additionally, you can add multiple filter conditions and define custom logic for how they should be evaluated.
AND: Provide results If all provided conditions are true
OR: Provide results If one of the provided conditions are true
Value Configurations
In this section, provide a value to compare or check against the selected field. You can provide a value by clicking on the gear icon. It opens up a screen to provide value using merge text.
Reference: Merge Text
Merge Text
Merge text is a key feature of the noKodr application, allowing users to display field values on the UI. Depending on the data type, users can perform mathematical operations on these fields.
For example, if you want to display a calculated total price based on the quantity and unit price entered by the user on a sales order form, and you wish to dynamically showcase this on the UI without saving the record in the database, you can achieve this using the UI fields in noKodr.
After selecting merge text you can you can see several options such as:
Attribute Name | Description |
---|---|
Source Type | In this option, you can select various sources from which you want to display values. |
Value | The available options will change depending on the selected source type. For example, if you choose "Static" as the source, you can provide a fixed static value. |
Merge Field Expression | The selected field from the source will be displayed in a merge format. For instance, the first name field from the contact model will appear as: {model:contact.FirstName}. |
Message Body | In this option, You can add multiple values to form your final UI merge text. For example, merge fields include {model:contact.FirstName},{model:contact.LastName} will eventually display the contact's first name and last name next to each other. |
Available Sources
After clicking on the Gear Icon, you can select various sources to include fields or values, such as variables, other models, static values, etc.
Source Type | Description |
---|---|
Static | Use this option to provide a fixed static value. |
Field | Select the field from the chosen object in the model whose value you want to include. |
Model | Choose the field from other models whose value you want to include. |
Variable | Select from the variables created in the layout whose value you want to use. |
Cookie Key | Choose the available cookie key whose value you want to include from your browser. |
Local Storage Key | Select the available Local Storage Key whose value you want to include from your browser. |
User | You can also select fields from the current logged-in user in your organization to include in the merge. Note: The User source refers to the currently logged-in user in your organization. This means that if you include the First Name field from the user, each time a different user logs in, they will see their own First Name displayed. |
After selecting the source type, you need to choose the available options based on the selected type. For example, if you have selected "Model" as the source type, you will need to select one model from the available models.
Note: Only single record models are visible here and can be used in the merge text. Multi-record models are not supported here.
Once you select a model, the field options will become available. You can then choose the fields you want to include in your merge field expression and combine multiple fields to form your final expression in the message body.
For example, you can set the Billing State
to South Central Chillie
.
Add Condition & Group Condition
Condition | Description |
---|---|
Add Condition |
|
Add Group Condition |
|
Order By
Order By Attributes | Description |
---|---|
Field Name | Here user can select the object field on whose basis order by is to executed. |
Sort As | Here, you can sort the fields in either Ascending Order or Descending Order. |
Action Details
Attribute Name | Description |
---|---|
Label | A user-friendly name for the action, used for easy identification within the application. |
Name | The unique identifier for the action, typically used in code or within merge text. |
Is Async? | Decides whether the action will be performed in async context or within sync context. |
Description | A user-friendly description for the action, used for easy apprehend within the application. |
Is Async : Brief Explaination
Is Async checkbox provides flexibility in managing how actions within workflows are executed in relation to system transactions. Here's how it works:
Single Transaction Execution: When multiple actions within a workflow have Is Async set to
false
, they are executed within a single transaction. This ensures that all actions complete successfully, or if one fails, the entire transaction is rolled back, maintaining data integrity.Breaking Transactions: When an action within the workflow has Is Async set to
true
, a new transaction is initiated at that point. This allows for separation between the actions, enabling different parts of the workflow to be processed independently.Handling Large Data: The Is Async feature is especially useful when working with large amounts of data that may risk hitting system governor limits. By setting certain actions as asynchronous, you can ensure that the workflow avoids limits by breaking the execution into multiple transactions.
This feature empowers users to control how workflows behave during execution, optimizing performance and avoiding potential issues with system resources.
Input
Overview
In noKodr, an Input Variable is used to temporarily store a value and pass it to a desired action or component within the application. It facilitates the dynamic transfer of data between different elements of the application.
Temporary Storage: Stores values temporarily during the application's operation, allowing for flexible data handling.
Data Passing: Enables the transfer of values to other workflow actions or components, such as layouts, Components etc. based on user interactions or other triggers.
For example, Suppose you have a button that, when clicked, opens a layout or modal (screen) displaying a user's personal information. To achieve this, you can use an Input Variable to pass the user's ID from the button click event to the layout or modal. This allows the layout to retrieve and display the relevant personal information associated with that user ID.
Variable Config | Description |
---|---|
Label | A user-friendly name for the variable, used for easy identification within the application. |
Name | The unique identifier for the variable, typically used in code or within merge text. |
Field Type | Specifies the type of data the variable will hold (e.g., text, number, date, etc). Reference: Field Types |
Default Value | The initial value assigned to the variable, applied if no other value is provided. Note: It depends on the field type we choose. |
Required | If checked true, the variable becomes required. |
Is Array ? | Checkbox that indicates whether the variable can store multiple values (an array) instead of just one. |
Field Types
Data Type | Description |
---|---|
Text | Stores a string of characters, such as names or descriptions. |
Checkbox | Represents a boolean value (true/false) typically used for on/off or yes/no selections. |
Integer | Holds whole numbers without decimals, used for counting or numerical calculations. |
Double | Stores numbers with decimals, allowing for more precise calculations. |
Record | Represents a single Salesforce record, such as an account or contact. |
Object | Stores complex data structures or objects, often containing multiple fields or properties. |
Currency | Used to represent monetary values, ensuring proper formatting and calculations. |
Date | Stores a calendar date (year, month, day) without time information. |
DateTime | Stores both date and time information together. |
Picklist | A dropdown menu that allows users to select a single value from a predefined list. |
Tags | Stores a list of keywords or labels used for categorization or filtering. |
Specifically formatted to store email addresses. | |
Phone | Holds phone numbers, often with specific formatting. |
URL | Stores web addresses (Uniform Resource Locators) for linking to external resources. |
Radio | Represents a group of mutually exclusive options where only one can be selected. |
Time | Stores time information without an associated date. |
Percentage | Stores numerical values represented as percentages, often used in calculations or metrics. |
Text Area | Allows for the input of larger amounts of text, often used for comments or detailed descriptions. |
Duration | Stores a length of time, typically used for measuring intervals or time spans. |
Multi Picklist | Allows users to select multiple values from a predefined list. |
For example, if an online delivery platform wants to separate records of clients named Ryan
residing in Chillie
, then they can use query records and filter criteria on records such as
0 Comments