How to Filter and Fetch Entities with State for Flow Execution Extensions?
I need to filter and fetch entities based on their state but cannot include the state in the Fetch Entities
step due to the state being tied to a separate table (folder table). Is there a way to fetch data and filter by state in one step?
Comments
-
Unfortunately, you cannot directly filter entities by state within the
Fetch Entities
step because the state field is linked to the folder table, while the flow execution extension data (FEE) is tied to a different table. To resolve this, you can use a SQL parameterized query to join the relevant tables and filter the data based on the state.Here’s a SQL query workaround that can help you achieve this:
SELECT * FROM entity_folder INNER JOIN flow_tracking_folder_data ON entity_folder.extension_id = flow_tracking_folder_data.extension_id INNER JOIN YOUR_FLOW_EXEC_EXT_DATASTRUCTURE_TABLE ON YOUR_FLOW_EXEC_EXT_DATASTRUCTURE_TABLE.id = flow_tracking_folder_data.flow_tracking_ex_id WHERE entity_folder.state = @folderstate AND name = @firstName
This query joins the
entity_folder
table,flow_tracking_folder_data
table, and the flow execution extension table, allowing you to filter by state and other fields. You can pass the state as a parameter in the query when executing it in your flow.You can also refer to the following documentation for more details:
Howdy, Stranger!
Categories
- 4.3K All Categories
- 74 General
- 12 Training
- 206 Installation / Setup
- 1.1K Flows
- 110 Rules
- 268 Administration
- 212 Portal
- 496 General Q & A
- 709 Forms
- 344 Reports
- 3 Designer Extensions
- 48 Example Flows
- 57 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 184 Pages
- 5 Process Mining
- New Features
- 186 Datastructures
- 70 Repository
- 229 Integrations
- 28 Multi-Tenant
- 27 SDK
- 81 Modules
- 58 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 143 Lunch And Learn Questions