LogoLogo
HomepageYouTube ChannelInstall from the AppExchange
  • Home
  • Dynamic Components
  • Flow Components
  • Experience Components
  • Projects
  • 👋Welcome
  • Getting Started
    • Installation & License Management
    • Quick Start Guide
    • Learning the Basics
    • Reactive Data Components
  • Experience Components
    • 🖼️View All Components
    • Accordion
    • Accordion Section
    • Alert
    • Audio
    • Avatar
    • Avatar Group
    • Banner
    • Bar Code
    • Blockquote
    • Button
    • Button Dialog
    • Button Group
    • Button Menu
    • Calendar
    • Card
    • Chip Container
    • Container
    • Data Table
    • Feed
    • Gallery
    • Icon
    • Illustration
    • Image
    • Kanban
    • Language Selector
    • Layout
    • List
    • Map
    • Media Object
    • Metric
    • Navigation
    • Profile Card
    • Progress Bar
    • Progress Circle
    • Progress Indicator
    • Publisher
    • Record Detail
    • Separator
    • Tabs
    • Text Block
    • Timeline
    • Video
  • Properties Panel
    • Appearance
    • Interactions
      • Show Toast
      • Navigate
      • Open Alert Modal
      • Open Confirm
      • Open Flow Dialog
  • Tutorials
    • General
      • Expressions for Aura Sites
      • Expressions for LWR Sites
    • Components
      • Banner
        • With Illustration and Buttons
        • With Content centered
      • Card
        • Creating a MapCard Showcase
      • Data Table
        • Configuring the Data Table to display current related record information
        • Displaying Salesforce CMS Files in a Data Table
      • Image
        • Utilizing Avonni Image Component for Before-and-After Image Comparisons
      • Layout
        • Configuring the Layout to be responsive
      • Map
        • Set up the map to show record details information
      • Profile Card
        • Set up the Profile Card to display current user information
      • Tabs
    • Interactions
      • Configure the Open Flow Dialog to open a flow by clicking a button
    • Reactive Components
      • Interactive Map
      • Linked Data Tables
      • Guide to Implementing
    • Use Cases
      • Building a record detail page header
      • Creating a MapCard Showcase
      • Creating a Grid Layout
      • Utilizing Avonni Image Component for Before-and-After Image Comparisons
  • HELP
    • How do I contact support?
    • How do I report bugs?
    • Release Notes
    • Security
Powered by GitBook
LogoLogo

Company

  • About Us
  • Pricing

Policies

  • Privacy Policy
  • Terms of Service
On this page
  • Keeping Tables in Sync
  • How to Make It Happen
  • The Accounts Table
  • The Contacts Table
  • The Result

Was this helpful?

  1. Tutorials
  2. Reactive Components

Linked Data Tables

Last updated 1 year ago

Was this helpful?

Keeping Tables in Sync

Imagine you have two tables on your page:

  1. Accounts Table: This table (accountsDatatable) lists all your customer accounts.

  2. Contacts Table: This table (contactsDatatable) lists all the contact people for your accounts.

The Goal: When you select an account in the Accounts Table, you want the Contacts Table to automatically update and show only the contacts for that specific account.

How to Make It Happen

The Accounts Table

  • Drag the Avonni Data Table Component

  • Make sure you've given this table the API name accountsDatatable.

  • Configure the Data Source by using the Query Data Source

  • Select the Accounts object

  • Configure the Data Mappings to create columns

The Contacts Table

  • This table is also set up, showing all your contacts.

  • Go to the "Data Source" section in the table's settings.

  • Choose the "Query Data Source" option.

  • Select the object that holds your contact information (e.g., "Contact").

  • Add a filter condition:

    • Field: Account Id (or whichever field links contacts to accounts)

    • Operator: Equals

    • Value: {{accountsDatatable.selectedRecord.Id}}

      • This expression code tells the Contacts Table to show only contacts whose Account ID matches the ID of the selected row in the Accounts Table.

  • Create columns by adding fields.

The Result

  • Users browse their account list in the Accounts Table.

  • They click on an account.

  • The Contacts Table instantly updates to show only the contacts associated with that chosen account.

This keeps your tables in sync and provides a smooth, intuitive user experience.