Using Variables and Component Data
Overview
Dynamic Components can pull from three types of data: global variables provided by Salesforce and the platform, resources you define yourself (variables, constants, formulas), and live attribute values from other components on your canvas. All three are accessed the same way — through the Resource Selector.
The Resource Selector
The Resource Selector is the small icon (x or a tag symbol) that appears next to configurable properties throughout the builder — in the Properties Panel, filter fields, and interaction settings. Clicking it opens a picker where you choose what data to bind to that property.

The three categories you'll see in the picker correspond to the three data types covered below:
Global Variables
Global variables give you context about the running environment — the current user, org, record, and component. They're always prefixed with $.

$User
Currently logged-in user. Common fields: $User.Id, $User.FirstName, $User.LastName, $User.Email. Useful for personalization and "My Records" filters.
$UserRole
Current user's role in the role hierarchy: $UserRole.Id, $UserRole.Name. Useful for visibility rules based on role.
$Profile
Current user's profile: $Profile.Id, $Profile.Name. Useful for visibility rules based on profile.
$Permission
Custom permissions assigned to the current user. Useful for showing or hiding UI elements based on specific permissions.
$Component
The full record currently being viewed, when the Target Page Object is set and the component is on a record page. Access any field with dot notation: $Component.record.Name, $Component.record.Industry.
$Component.recordId
Just the ID of the current record (15 or 18 characters). Also accessible as @recordId in the Resource Selector. Useful for passing to queries or interactions.
$Organization
Current org details: $Organization.Id, $Organization.Name.
$Location
Current user's geolocation (latitude and longitude), when location access is available. Useful for map components or proximity-based filters.
$System
System-level information such as the current date and time.
$Api
Salesforce API context. Used in advanced scenarios.
$Component and $Component.recordId require the Target Page Object to be set — see the Target Page Object page for details.
Resources (Variables, Constants, Formulas)
Resources are values you define in the Resources Panel. To use one, click the Resource Selector next to any property and select it from the list. The builder displays the reference as {!YourResourceApiName}.
Common uses: storing user input, computing display values with formulas, setting filter values, controlling component visibility, and passing data between interactions.
Component Attributes
Component attributes let one component read another's live state — this is the main mechanism for building reactive interfaces.
To reference a component attribute:
Click the Resource Selector
Select the source component
.value
Inputs, comboboxes, sliders
Current selected or entered value
.firstSelectedRow
Data Table
The full row object of the selected row
.activeItemValue
Tabs
The value of the currently active tab
Examples
Example 1: Showing the current user's full name
Example 2: Showing a button only when a specific status is selected
Imagine you have a combobox that allows users to select a status ('Active' or 'Inactive'). You want to show a "Reactivate" button only when 'Inactive' is selected.
Add Combobox: Add an Avonni Combobox. Give it an
API Name(e.g.,StatusSelector). Configure its options (Label/Value: Active/active, Inactive/inactive).Add Button: Add an Avonni Button. Set its
Labelto "Reactivate".Set Button Visibility: Select the Button. In the property, click the resource selector:
Choose Component Attribute.
Component: Select your Combobox (
StatusSelector).Attribute: Select
value.Operator: Set to
equals.Value: Enter the text
inactive(matching the combobox option value).
Last updated
Was this helpful?
