Fetch Entities Step
  • 04 Dec 2023
  • 3 Minutes to read
  • Dark
    Light

Fetch Entities Step

  • Dark
    Light

Article Summary

Step Details

Introduced in Version---
Modified in Version7.12.0
LocationDatabase

The Fetch Entities step allows users to pull data from any entity in a Flow. The data can include Folders, built-in and custom Data Types, and Database Types. The Fetch Entities step can also define certain Fetch Criteria using query definitions and Sort options for retrieved data.



Limitation
This step is case-insensitive. It will not differentiate between upper and lower case.

Properties

Entity Fetch Definition

Property NameDescriptionData Type
Type NameDefine which Type is being fetched by the step. ---
Extension Type NameDefine which Extension Data Type is fetched by the Step, if not a default Type. ---
Fetch Deleted EntitiesWill fetch entities that were deleted---
Show Path For One ResultWill add an outcome path for a single result---
Fetch CriteriaAllows the user to add new Fetch Criteria by using the Field Name to construct a query-like statement for Decisions to interpret automatically within the step. More than one Fetch Criteria can be configured. ---
Limit ResultsThis Input allows users to define a specific number of fetched results. ---
Sort FieldSelect which Field the results will be sorted by.---
Sort Order FieldSelect whether the Sort Order will be ascending or descending.---
Fetch Deleted EntitiesEnabling this feature fetches Entities where the "Deleted" criteria is true.---
Fast FetchEnabling this feature fetches Entities quickly through indexing. ---
Fetch Edit Copy of Entity Retrieves a cached copy of the object for the Flow to manipulate. ---
Read Uncommitted DataEnabling this feature allows Decisions to read entities in a database that have been changed but not saved. ---
Show Query In OutputPasses the query of the fetch as an output.
For example: Query: "select main.* from entity_account  AS  main  with ( nolock )  "
---
Respect PermissionsIf enabled, the step will not fetch entities until the user has the minimum 'CanUse' permission for that folder.
---

Outputs

PropertyDescriptionData Type
Entity ResultsList of objects that meet all the fetch criteria ---

Query Match Type SQL Equivalent

The Query Match Type field contains the query operators that fetch specific data that match a specified condition. In a SQL query statement, these operators are used in the "WHERE" clause. The table below lists the Query Match Types, their equivalence in SQL, and an example.

Query Match TypeSQL EquivalentExampleDescription
EqualsWithoutCaseiLIKESELECT (column_names)
FROM (table)
WHERE (column_names) iLIKE {value};
Used for equality tests within two expressions.
ContainsCONTAINSSELECT *
FROM(table)
WHERE CONTAINS (column_names) , (text_Value);
Does a full-text search on full-text indexed columns containing character-based data types.
DoesNotEqualNot equal (<>, !=)

SELECT (column_names)
FROM (table)
WHERE (column_names)  <> {value};

Checks if two expressions are not equal.
GreaterThanOrEqualToGreater Than or Equals To (>=)
SELECT (column_names)
 FROM (table)
WHERE (column_names)  >= {value};
Used to test whether an expression is greater than or equal to another.
LessThanOrEqualToLess Than or Equals To (<=)

SELECT (column_names) 

 FROM (table)

WHERE (column_names)  <= {value};


Used to test whether an expression is greater than or equal to another.
GreaterThanGreater Than (>)SELECT (column_names)
 FROM (table)
WHERE (column_names)  > {value};
Used to test whether an expression is greater than another one.
LessThanLess Than(<)SELECT (column_names)
 FROM (table)
WHERE(column_names)  < {value};
Used to test whether an expression is less than another one.
Exists


EXIST



SELECT (column_names)
 FROM {table}
WHERE EXISTS (subquery);
Checks the existence of a result of a Subquery. It pulls data that is TRUE if the subquery returns one or more records.
DoesNotExistNOT EXISTSELECT (column_names)
FROM (table)
WHERE NOT EXISTS (subquery);
Used for existence determination but works opposite of EXIST operator. It will be TRUE if there are no records are returned.
IsNotNullIS NOT NULLSELECT column_names
FROM table_name
WHERE column_name IS NOT NULL;
Tests for empty values.
IsNullIS NULLSELECT column_names
FROM table_name
WHERE column_name IS NULL;
Tests for non-empty values.
StartsWithLIKE Value%SELECT * FROM (table)
WHERE (Column) LIKE 'S%';
Finds any record that starts with the given value.
EndsWithLIKE %ValueSELECT * FROM (table)
WHERE (Column) LIKE '%S';
Finds any record that ends with the given value.
DoesNotContainNOT IN %value%
NOT LIKE %value%
SELECT *
FROM (table)
WHERE (Column) NOT LIKE '%text%';
Finds records that do not contain a specific value.
DoesNotEndWithNOT IN %value
NOT LIKE %value
SELECT *
FROM (table)
WHERE (Column) NOT LIKE '%text';
Finds records that do not end contain a specific value.
DoesNotStartWithNOT IN value%
NOT LIKE value%
SELECT *
FROM (table)
WHERE (Column) NOT LIKE 'text%';
Finds records that do not start contain a specific value.
Input Data Alias aliasSELECT column_name AS alias_name
FROM table_name;
Gives input criteria a separate name from the default field name. Allows differentiation between criteria set on the same field. 
IsInListINSELECT *
FROM (table)
WHERE column_name IN (value1, value2)
Finds records that match any of the specified values
NotInListNOT IN SELECT *
FROM (table)
WHERE column_name NOT IN (value1, value2)
Finds records that do not match any of the specified values


Step Changes

DescriptionVersionDeveloper Task
Added the "Respect Permissions" setting to the Fetch Entities, Get Count, Fetch Distinct Values, Delete Entities, and Update Entities steps. 8.16
[DT-033517]
Equals conditions replaced with EqualsWithoutCase conditions.
8.17[DT-039141]

Related Information

Forum Posts:
Fetch Entities: AND Or Or?
Using Fetch Entities Behavior
Paginating Fetch Entities Step


Was this article helpful?