Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...

Note: This will be blank, if no object is chosen.

Config Field

Description

Source Type

In this optiondropdown, you can select a source among various sources from which you want to query records. It allows to choose from Object, Model and Variable.

info

Note: By default, the Source Type is Object

.info

. 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 select amount specify the number of records to query . Either you can choose Single or Multi-recordfrom the selected object. You can choose to retrieve either a single record or multiple records based on your operational needs.

  • Single Record: Queries only one record from the object, typically the first matching record.

  • Multi-Record: Queries multiple records, allowing you to retrieve a set of records that match your query criteria.

Fields

In this option, you can see view and select fields from the object you selected which have previously chosen. These fields represent the data points within the object that you can query for.

Info

Selected Fields

In this option, you can see selected fields by you which are querying for.

Filters

It This option enables user to filter out the data for 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.

Info

Reference: Filters

Order ByIt enables to perform order by and sort records on basis of fields,

  • You can specify the order in which fields are used to query and display records in the List View.

  • Records can be sorted in either ascending or descending order.

Info

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 OFFSET clause to paginate through records.

Panel
panelIconId1f5e8
panelIcon:speech_left:
panelIconText🗨️
bgColor#F4F5F7

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.

Action Details:

...

//Action Details ~ Workflows

Include Page
isMissingRequiredParameterstrue

Input:

...

//Manage Input Variable ~Workflows Modal

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.

Info

Reference: Merge Text

...

Include Page
Merge Text Config
Merge Text Config
Panel
panelIconId1f5e8
panelIcon:speech_left:
panelIconText🗨️
bgColor#F4F5F7

For example, you can set the Billing State to South Central Chillie.

...

Add Condition & Group Condition

Condition

Description

Add Condition

  • The Add Condition feature allows users to define multiple criteria that must be met for a validation rule to trigger.

  • This feature is used to create complex logic by combining different conditions that Salesforce evaluates before allowing a record to be saved.

Add Group Condition

  • The Add Group Condition feature allows users to group multiple conditions together, creating complex logic that involves different sets of criteria.

  • This feature is particularly useful when combining conditions that should be evaluated as a unit (logical OR within a group) or when nesting conditions for more advanced logic.

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

...

Include Page
Action Details
Action Details

Input

...

Include Page
Manage Input Variable
Manage Input Variable
Panel
panelIconId1f5e8
panelIcon:speech_left:
panelIconText🗨️
bgColor#F4F5F7

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

image-20240905-125144.pngImage Added