Bind the Initial Filter Selection

You can use a results interaction to dynamically set the initial selection of a query based on a characteristic of the logged-in user. For example, you can filter a region-based dashboard based on the country of the logged-in user.

  • Example

Only staticflex-, saql-, or soql-type queries can use interactions for initial filter selections.

For example, to focus the dashboard on the logged-in user’s country, configure the list widget to select the country when the dashboard first opens.

"USA" is automatically selected as the country when you first open the dashboard.

To implement this behavior, define a query that retrieves the logged-in user’s country from the Salesforce User object. To do this, select the list widget, navigate to the Advanced Editor in the Query section, and add the following JSON query in the Query tab.

Then bind the initial selection in the list widget’s query to the logged-in user’s country. Here the binding is in the start attribute.

For more information about results interactions and bindings, visit the Use Bindings to Compare Data Trailhead module.