Download PDF
Download page Get Records.
Get Records
The Get Records activity allows you to retrieve a record of any object from the database, store the result in a variable, and use it in subsequent workflow activities for further processing.
Group: Data
Nature: Non-Blocking
When the workflow reaches this activity, it retrieves data from the database based on the specified configurations and criteria. The data is preserved until a blocking activity suspends the workflow. Until then, it can be used in loop, Assignment and update activity.
Example: Managing Expiring Contracts
In a contract management system, the Get Records activity helps identify active contracts approaching their expiration dates. You run a specific query on the Contract object to filter records based on criteria such as status or expiration date. Save the filtered results in a variable for easy access in later workflow activities. After retrieving the active contracts, use a For Loop to process each contract individually. This setup allows you to send automated notifications to contract owners, create tasks for legal reviews, and log all actions taken.
Properties and activity information
Properties determines the initial behavior of the activity.
Field | Description |
---|---|
Properties | |
Object Name | Search for and select the object whose records you want to find. |
Criteria | Set the conditions to narrow down the list of returned records.
To add more conditions, click Add Criteria. To remove all conditions, click Remove All. |
Filter Expression | By default, the application applies AND logic to all criteria. You can adjust this to create more complex logical expressions if needed. You can customize your logic using parentheses, AND, OR, and NOT. For example, if you enter “(1 AND 2 AND 3) OR 4”, the system will evaluate whether all three of the first conditions are true, or if the fourth condition is true. |
Criteria Expression | Displays the criteria expression based on the selected field, operator, and value condition. You can also use liquid expressions to define criteria based on the context object of the current workflow instance or use variable values. To access the liquid expression editor, click the icon and select the Expression option. Example: You can use free-form text to match conditions on selected object fields, such as:
If the current workflow is defined on the Activity History object and you need to fetch Agreement data, the condition would be:
|
Fields | Search and select the fields you want to retrieve for the chosen object. You can add multiple fields. |
Collection Variable Name | Enter a variable name. The system creates a variable that stores the values of all records fetched based on your specified criteria. You can use this variable later in activities such as Loop, Assignment, and Update for further processing. |
Records Required | Specify the number of records to be fetched from the database based on the conditions provided. You can choose to fetch either the first record or all matching records. The maximum number of records that can be fetched is 2,000. |
Sort Order | Select how you want to display the fetched records: Ascending or Descending. |
Sort Column | Search and select the column name against which the data should be sorted. |
Common | |
Name | Enter the technical name of the activity. |
Display Name | This field auto-populates but can be changed if needed. |
Description | Provide a description that is relevant to the activity. |