Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Build Tabs on One Screen with Navigation

Build a tab bar on one flow screen that shows Overview, Contacts, Opportunities or Cases of an account, with no extra screens and no Next click.

A service agent opens a screen flow from an account and needs its contacts, opportunities and cases without leaving the screen. Four screens with Next and Previous buttons make that slow. One screen with a menu across the top, where each item reveals its own section, keeps everything one click away.

A horizontal menu with the Cases item active and the account open cases listed below it
Clicking Cases shows the Cases section and hides the other three.

Before you start

  • A screen flow that receives the account Id, for example a text input variable recordId.

  • The records each tab shows, fetched before the screen (one Get Records per object, filtered on AccountId equals {!recordId}).

  • The Navigation component reference, for every property this page does not use.

Steps

1

Add the Navigation at the top of the screen

  1. Add a Screen element and drag the Avonni Navigation component to the top of it.

  2. Give it a clear API name, for example AccountTabs. You will pick it by that name in every visibility rule.

  3. Click Open Component Builder.

  4. Keep Orientation on Horizontal (the default). A horizontal Navigation reads as a row of tabs.

2

Create the four items

  1. Keep the Manual data source and click Add Items under Items four times.

  2. Give each item a Label and a Value:

Label
Value

Overview

overview

Contacts

contacts

Opportunities

opportunities

Cases

cases

  1. Set Active Navigation Item Value to overview, so the screen opens on the first tab.

Your visibility rules compare the value, never the label. Keep values lowercase with no spaces, and do not change them once the rules exist. You can rename a label at any time, but a renamed value breaks every rule that uses it, with no error.

3

Add one section per tab

  1. Below the Navigation, add four Section components to the screen, one per tab.

  2. Put what each tab shows inside its section: a Display Text with the account details in the first, a data table of {!Get_Contacts} in the second, and so on.

Any component works inside a section. The section is only the container that you show or hide.

4

Show each section only for its tab

Select the Contacts section, open Set Component Visibility and add one condition:

  • Resource: AccountTabs > Active Navigation Item Value

  • Operator: Equals

  • Value: contacts

Repeat for Opportunities (opportunities) and Cases (cases).

For the Overview section, choose Any Condition Is Met (OR) and add two conditions: Active Navigation Item Value Equals overview, and Active Navigation Item Value Is Null True. The second one keeps Overview visible if the default value is ever cleared.

Set Component Visibility condition comparing the Navigation active item value to contacts
The Contacts section shows only when the active item value is contacts.
5

Save and test

Save the flow and click Debug with an account Id. The screen opens on Overview with the Overview tab highlighted. Click Cases: the Overview section disappears and the Cases section appears in its place. The flow stays on the same screen.

This works because the Navigation sends the new Active Navigation Item Value to the screen as soon as an item is selected, and Flow re-evaluates the visibility rules that read it without leaving the screen.

Troubleshooting

Clicking a tab changes nothing

Check the Value in the visibility rule against the item's Value, character for character. Cases and cases are two different values. Then check that the rule points at the Navigation's Active Navigation Item Value, not at a flow variable of the same name.

No section shows when the screen opens

Active Navigation Item Value is empty or holds a value that matches no rule. Set it to overview, or add the Is Null condition to the Overview section as in step 4.

Two sections show at once

Two rules compare against the same value. Each section needs its own value.

Was this helpful?