LogoLogo
HomepageYouTube ChannelInstall from the AppExchange
  • Home
  • Dynamic Components
  • Flow Components
  • Experience Components
  • Projects
  • 👋Welcome
  • Getting Started
    • Product Tour
    • Quickstart Guide
    • Learn the Basics
    • Installation & Licenses management
    • Flow vs. Dynamic Components
    • Integrating with Experience Cloud
  • Tutorials
    • Videos
    • Projects Tutorials
    • Components Tutorials
      • Alert
        • Create a custom branding alert
        • Create an error alert dismissible
      • Avatar
        • Create an avatar with actions
        • Create an avatar with details
      • Avatar Group
        • Display a list of contacts related to an account
        • Display a list of sharing users related to the record
      • Barcode
        • Generating and Displaying Barcodes for Product Codes
      • Biometrics
        • 101 Tutorial
      • Button
        • Customizing Flow Navigation Buttons
        • How to Add a "Cancel and Close" Button
        • How to Open Flows from Buttons
      • Button Groups
        • Identifying Clicked Buttons
      • Button Menu
        • How to change dynamically Avonni Button Menu Icons
      • Calendar
        • Calendar 101 Tutorial
        • How to Connect Multiple Data Sources to the Avonni Calendar
        • How to Customize Time Spans
        • How to Customize the Right-Click Menu
        • How to Add an Edit Action to Events
        • How to Add a New Event Button to the Avonni Calendar Header
        • How to Create Events by Dragging in the Avonni Calendar
        • How to Reschedule Events with Drag and Drop
        • How to Color-Code Calendar Entries in the Avonni Calendar
        • Using a variable Data Source
        • Using a Query Data Source
      • Carousel
        • Build a Related Products Carousel
      • Combobox
        • Implement Dependent Picklists in Comboboxes
        • How to Dynamically Enable/Disable Dependent Picklists
        • Using Multi-Select Comboboxes with Reactive Formulas
      • CSV Parser
        • 101 Tutorial
      • Data Table
        • Adding Filters
        • How to add Images onthe Data Table
        • Creating Row Actions
        • Displaying a Record as a QR Code
        • Displaying Record Name field as a link
        • Learn the Basics
        • Making a field editable
        • Setting Up Data Export
        • Tips and Tricks
          • Activate infinite scrolling
          • Creating an action from a button or a link
          • Customizing the Badge Color using a formula
          • How to Grayscale Header Actions Dynamically in Avonni Data Table
          • How to Conditionally Color Cells
          • Enabling auto-refresh on the Data Table when pressing a button
          • Handling formula text field
          • How to set column visibity
          • Passing multiple record IDs to another flow
          • Data Table Editor
      • Date Picker
        • Display a date picker with Marked Dates from a Get Records
      • Date Time Picker
        • How to create Collection Variables for StartDateTime and EndDateTime
        • How to Block Out Times
      • Delay Interaction
        • Creating a Confetti Celebration on the Final Screen
        • Launch a flow dialog without a screen
      • Dual Listbox
        • Display contacts with custom icons
        • Accounts list group by industry
      • Expandable Section
        • How to add components into an expandable section
      • Header
        • Building Engaging Card Headers
        • Crafting a Profile Header
        • Adding Action Buttons to Headers
        • Adding a Background Image to Your Header
      • Input Pen
        • Add the custom Toolbar
        • How to Store Input Pen Drawings as Attachments in Salesforce
      • Kanban
        • 📹Introduction
      • List
        • Create a grid list with images
        • Create a sortable list
        • How to Reorder Items and Update Records
        • Vertical List with Actions
      • Navigation
      • Map
        • Customize the Map Marker
        • Visualizing Account Information on a Map
      • Metric
        • 📹Introduction
      • Microphone
        • Save the Microphone recording file as an attached on a record
      • Progress Indicator
        • Creating a Universal Dynamic Progress Step Collection
        • How to Change the Appearance of Your Progress Indicator using a variable
        • Error Handling
      • QR Code
        • Generate a QR Code from a record field
      • Record Detail
        • Using the Record Detail with Reactive Screens
      • Scoped Notification
        • Display message based on a value
      • Text Area
        • TextArea issue with max length when clicking on the next button
      • Tree
        • Build a Tree View with Dynamic Record Details
      • Timeline
        • Assigning multiple source collection to the Timeline
        • Customizing Date Format in the Timeline Component using Luxon
        • Create a horizontal activity timeline
        • Display Tasks
        • Perform actions on selected tasks
      • Vertical Visual Picker
        • Adding sub-items
        • Display a list of online contacts
    • Interactions
      • Enabling auto-refresh for queries after the Flow Dialog ends
      • Creating a Confetti Celebration on the final screen
      • How to create an interaction to navigate to an object
      • How to create an interaction to a record page
      • How to create an interaction to open another flow
      • How to pass an Input Variable from One Flow to Another
      • How to setup an Open Flow Panel interaction
    • Reactive Query Tutorials
      • How to make Data Tables Reactive
      • Build a reactive Data Table Using Dependent Picklists
      • Building a Dynamic Metrics Dashboard with the Data Table
      • How to build a reactive 'Quarterly Opportunity Tracker' component
      • How to Create a Combobox-Filtered Data Table
      • Create a Dynamically Linked Account-Contact View
      • Troubleshooting
    • Tips and Tricks
      • Copy / Paste a component settings
      • Create a link to the record using the href attribute
      • Create a variable and use it in a component property
      • Data Table
      • Hide Standard Header and Footer in a flow
      • How to pass your current RecordID in your screen flow
    • Platform Events
      • Configuration tutorial
  • Flow Components
    • Explore All Components
    • Alert
    • Audio Player
    • Avatar
    • Avatar Group
    • Barcode
    • Barcode Scanner
    • Biometrics
    • Blockquote
    • Button
    • Button Group
    • Button Icon
    • Button Menu
    • Calendar
    • Carousel
    • Chart
    • Chip Container
    • Combobox
    • Color Picker
    • CSV Parser
    • Date Picker
    • Data Table
    • Date Time Picker
    • Delay Interaction
    • Document Scanner
    • Dual Listbox
    • Expandable Section
    • Formatted Address
    • Formatted Name
    • Formatted Value
    • Header
    • Hero Banner
    • Icon Picker
    • Image
    • Input Choice Set
    • Input Choice Set Grid
    • Input Counter
    • Input Date Range
    • Input Pen
    • Illustration
    • Interaction service
    • Kanban
    • List
    • Map
    • Metric
    • Microphone
    • Navigation
    • NFC Scanner
    • Pill Container
    • Progress Bar
    • Progress Circle
    • Progress Indicator
    • Progress Popover
    • QR Code
    • Rating
    • Record Detail
    • Scoped Notification
    • Separator
    • Slider
    • Tabs
    • Text Area
    • Timeline
    • Tree
    • User Location
    • Vertical Visual Picker
    • Visual Picker
    • Visual Picker Link
    • Video Player
    • Welcome Mat
  • Component Builder
    • Overview
    • Properties Pane
    • Interactions Pane
      • Copy Records
      • Download
      • Export To
      • Fire Confetti
      • Flow Navigation
      • Navigate
      • Show Toast
      • Open Alert Modal
      • Open Confirm
      • Open Flow Dialog
      • Open Flow Panel
      • Update Records
      • Refresh Query
      • Refresh All Queries
      • Open Quick Action
    • Style Pane
    • Component Templates
    • Layout and Customization
      • Alignment controls
      • Copy / Paste component settings
      • Margin / Padding
      • Pull To Boundary
      • Undo / Redo
  • Data Sources
    • Understanding Data Sources
    • Manual
    • Variable
    • Query
    • Query VS Variable
    • Picklist
  • Actions
    • Overview
    • Data Manipulation and Transformation
      • Convert Lead
      • Create file
      • Split Text to Text Collection
      • SObject Collection Math
      • SObject Collection Join
      • Get Record from SObject Collection
      • SObject Collection to Activity Timeline Items
      • SObject Collection to Calendar Marked Date Collection
      • SObject Collection to Scheduler Events
      • SObject Collection to Text Collection
    • Data Conversion and Formatting
      • Text Collection Get Value
      • Get Value from String Collection
      • Number Collection Get Value
      • Join Text Collection
      • Format Text in SObject Collection
      • Format Text Collection
      • Text Collection to Combobox Options
      • Text Collection to Dual Listbox Options
      • Text Collection to Progress Indicator Steps
    • UI & Navigation
      • New Avatar Action Collection
      • New Button Menu Item Collection
      • New Carousel Item Collection
      • New Combobox Option Collection
      • New Dual Listbox Option Collection
      • New Header Action Collection
      • New Header Avatar Action Collection
      • New List Action Collection
      • New Navigation Item Collection
      • New Progress Indicator Step Collection
      • New Progress Popover Step Collection
      • New Slider Custom Label Collection
  • Help
    • Performance Guide
    • How do I contact support?
    • How do I report Bugs?
    • Troubleshooting
    • Release Process
  • Miscellaneous
    • Live use cases examples
    • Release Notes
    • Salesforce Flow Limit
    • Security
Powered by GitBook
On this page
  • Using the Avonni Query Data Source
  • Location and Usage
  • Implementing Queries
  • Displaying Opportunities by Stage and Close Date
  • Benefits of Using the Avonni Query Data Source
  • Reactive Queries: Making Your Components Interactive
  • What are Reactive Screens
  • How Reactive Queries Work
  • Example
  • Tutorials
  • Configuring Query Filters
  • Example of Setting Filter Conditions
  • Grouping Conditions in Queries
  • Understanding Query Operators
  • Platform Events Integration
  • System Mode
  • Troubleshooting
  • Step 1: Visualize the Output
  • Step 2: Direct SOQL Testing
  • Interpreting the Results
  • Using 'Custom Fields'

Was this helpful?

  1. Data Sources

Query

Last updated 1 month ago

Was this helpful?

LogoLogo

Company

  • About Us
  • Pricing

Policies

  • Privacy Policy
  • Terms of Service

Using the Avonni Query Data Source

The Avonni Query Data Source empowers you to retrieve and display Salesforce data within your flows with greater flexibility and control than the standard "Get Records" element. It's not a standalone Flow action or a separate component; instead, it's a data source option built into specific Avonni components like the , , , and when used inside a Flow. This means you configure the query directly within the Avonni component's settings, not as a separate object.

This guide explains how to use the Avonni Query Data Source, covering key concepts and addressing common points of confusion.

Location and Usage

The Avonni Query Data Source is accessed within the properties of supported Avonni components when used in a Flow. You won't find it as a separate action in the Flow toolbox. To use it:

  • Add an Avonni component (e.g., Data Table) to your Flow canvas.

  • Select the component.

  • Find the "Data Source" section in the component's properties panel.

  • Select "Query" as the data source type.

Implementing Queries

Instead of writing SOQL directly, Avonni provides a user-friendly visual interface to build queries within the component's settings. This interface allows you to:

  • Select the Salesforce Object: Choose the object you want to query (e.g., Accounts, Contacts, Opportunities).

  • Set Filter Conditions: Visually define filter criteria using fields, operators (e.g., equals, greater than, less than), and values.

  • Use Grouping Conditions: Create complex filter logic using grouping (AND/OR) to combine multiple conditions.

  • Configure Sorting: Specify how the results should be ordered (ascending or descending).

All query configuration is done within the component's properties in the Flow Builder. You don't need external SOQL tools or manual SOQL code.

Displaying Opportunities by Stage and Close Date

This example demonstrates how to use the visual query builder to display opportunities closing this month, grouped by stage:

Step 1: Add the Data Table to the Flow

Drag and drop an Avonni Data Table component onto your Flow canvas.

Step 2: Configure the Data Source

  • Select the Data Table component.

  • In the component's properties panel, locate the "Data Source" section.

  • Choose "Query" as the data source type.

Step 3: Build the Query Visually

The Avonni component's interface guides you through constructing the query:

  • Select the Object: Choose "Opportunity" as the object for your data.

  • Define Filters: To focus on opportunities closing this month, use the filter options:

    • Select the "CloseDate" field.

    • Choose the "equals" operator.

    • Select "This Month" as the value. This dynamically filters the data only to include opportunities with a close date within the current month.

  • Group Data: To organize the results by stage, use the "Group By" option and select the "StageName" field. This will group all opportunities with the same stage.

Step 4: Configure the Data Table Columns

Map the query results to the Data Table columns:

  • Name: Map this to an "Opportunity Name" column.

  • StageName: Map this to a "Stage" column.

  • Amount: Map this to an "Amount" column.

  • Probability: Map this to a "Probability" column.

  • LastModifiedDate: Map this to a "Last Modified Date" column.

Step 5: Connect the Flow: Finally, connect the Data Table to the rest of your Flow logic as needed

Benefits of Using the Avonni Query Data Source

The Avonni Query Data Source provides significant advantages for data retrieval and display in Salesforce Flows, especially for creating dynamic and interactive user experiences:

Simplified Query Creation (Visual Interface)

The Avonni Query Data Source offers a user-friendly visual interface for building queries, eliminating the need to write SOQL code directly. This simplifies query creation and makes it accessible to users without SOQL expertise.

Access to Expanded Datasets

Unlike the standard "Get Records" element in Flows, which has a 50,000-record limit, the Avonni Query Data Source allows you to retrieve larger datasets. This is essential for working with substantial data volumes or querying across multiple related objects.


Reactive Queries: Making Your Components Interactive

Reactive queries are a powerful feature that allows your Avonni components to respond dynamically to user actions.

What are Reactive Screens

Reactive screens update instantly based on user interactions. Combining this with reactive queries makes your data displays genuinely interactive.

How Reactive Queries Work

Example

Tutorials

Configuring Query Filters

The Avonni Components lets you add conditions to your data queries, similar to using the 'WHERE' clause in a Salesforce query. This allows you to specify precisely what data you want to pull in.

If you create filters directly in the filter menu (by selecting fields, adding operators and values, or grouping conditions), they won't automatically change when other components on your screen are updated; they stay fixed.

Example of Setting Filter Conditions

Imagine you're working with Salesforce data and want to retrieve contact records in 'New York.' Here's how you can set this up:

  1. Specify the Field: Choose the field to which you want to apply the filter, such as 'Location'.

  2. Add the Filter Condition: In the filter condition, specify 'equals' and then 'New York'. This is analogous to writing a SOQL query where you would include WHERE Location = 'New York'.

This setup ensures that your query will only return contacts located in New York, filtering out all other records.

Grouping Conditions in Queries

To retrieve contacts in "New York" or "San Francisco" who are also "Active," you would create a group with two conditions ("Location" equals "New York" OR "Location" equals "San Francisco") and then add another condition outside the group ("Status" equals "Primary").

Understanding Query Operators

The visual query builder supports various operators:

  • Logical Operators: AND, OR, NOT

  • Comparison Operators: =, <>, <, >, <=, >=

  • Set Operators: IN, NOT IN

  • String Operators: LIKE, NOT LIKE

  • Null Operators: NULL, NOT NULL


Platform Events Integration


System Mode

System Mode ensures that guest users can see all the data they're supposed to in your embedded flows. This is important because, without System Mode, guest users might have limited access due to their permissions. By enabling System Mode, the query bypasses user-specific permissions and fetches data based on the permissions of the Salesforce system user.

Note: While System Mode enhances data visibility, it doesn't allow guest users to edit data they wouldn't normally access. This is due to Salesforce's security practices and restrictions on data editing.


Troubleshooting

Have trouble getting your reactive query formula to work correctly? Here's a breakdown of how to troubleshoot and achieve the desired results:

Step 1: Visualize the Output

Use a Display Text element to show the exact value your formula produces. This helps you understand if the formula's output suits your SOQL query. Think of it as a sneak peek into your formula's result.

Step 2: Direct SOQL Testing

Test your formula directly within a SOQL query. Remember to adjust it by:

  • Removing any extra symbols or variable references specific to Flow Builder.

  • Replacing placeholders with real values from your Salesforce data.


Interpreting the Results

  • Success! If your SOQL query returns the expected results, congratulations! Your formula is likely correct.

  • Error? If Salesforce throws an error message, it means there's something wrong with the syntax or structure of your query. Carefully review your formula for any mistakes.

Example

Let's say your formula looks like this:

"Name LIKE '%"&{!NameInput.value}&"%' AND Account.Industry = '"&{!IndustryCombobox.value}&"'" 

To use this in a SOQL query, you'd modify it to:

SQL

Name LIKE '%Acme%' AND Account.Industry = 'Technology'

Use code with caution.

Important Considerations

  • If your SOQL query with the modified formula throws an error, your original formula might have a syntax issue.

  • Ensure the values you use in your test SOQL query are valid and exist in your Salesforce org.

By following these steps, you can effectively pinpoint and resolve issues with your reactive query formulas.

Still Stuck?


Using 'Custom Fields'

The 'Custom Fields' section lets you add particular fields straight into your queries, bypassing the need to put them in the Avonni data table. This leads to a more customized querying approach, where you can include the fields needed for specific tasks or later steps.

Why use "Custom Fields":

  1. Allowing you to add specific fields directly Enhanced Flexibility: Customize your queries by including only the essential fields to particular interactions or screens.

  2. Improved Efficiency: Allowing you to add specific fields directly streamlines the querying process, making it quicker and more efficient.

  3. Focused Queries: This helps create more concentrated and precise queries by utilizing only the required fields, avoiding unnecessary clutter in the data table.

Dynamic Data Updates with Reactive Queries: The most distinctive feature of the Avonni Query Data Source is its support for reactive queries. These queries enable your Avonni components to automatically update the data displayed in response to user interactions within the Flow. This dynamic behavior is achieved using formula text variables that define the query's filter criteria. These formulas act as dynamic WHERE clauses, allowing the query to adapt in real-time to changes in other parts of the Flow. This is crucial for building truly interactive user interfaces. See the for a detailed explanation.

You create a formula text variable that defines the filter criteria. This formula is evaluated dynamically, allowing the query to adapt to changes. For a practical example, see the below.

Imagine a Flow where a user selects an Account. A reactive query could filter opportunities based on the chosen Account's ID. When the user selects a different Account, the Data Table updates automatically. For a detailed walkthrough, see the .

You can find more information about creating .

Some operators may not be available depending on the type of field you're trying to filter. For example, you can't use LIKE with a number field. Refer to for details on which operators are compatible with each field type.

The Query Data Source can connect to Platform Events for real-time updates. This allows your components to react instantly to changes in Salesforce data. For a configuration tutorial, see

If your SOQL query works fine and the Display Text output looks correct, but your Avonni component filters still don't behave as expected, a more nuanced issue might be at play. In this case, please don't hesitate to for assistance. We're here to help!

How to make Data Tables Reactive Tutorial
Salesforce documentation
Platform Events Configuration Tutorial.
contact our support team
Reactive Queries section
Reactive Query Example section
reactive filters here
Data Table
List
Carousel
Map
Cover

How to make Data Tables Reactive

Cover

How to build a reactive 'Quarterly Opportunity Tracker' component

Cover

How to Create a Combobox-Filtered Data Table

Cover

Create a Dynamically Linked Account-Contact View

Cover

Build a dynamic Data Table Using Dependent Picklists

POWER TIP: Alternatives to Screen Flows for Simple Display

If you're currently using Screen Flows to display information on a page (without any complex logic), consider switching to . You'll get faster loading times and a more straightforward setup for your data queries on Lightning Pages.

Avonni Dynamic Components package