How to Dynamically Pass Multiple Values as URL Parameters in Dashboard Linking
When creating interactive dashboards, it’s often necessary to pass multiple values dynamically through URL parameters to filter data on linked dashboards. Bold BI supports this functionality by allowing users to concatenate multiple string values using the string_agg
function. This function is particularly useful when working with PostgreSQL and Redshift data sources.
Using the string_agg
Function
The string_agg
function is an aggregate function that concatenates a list of strings, inserting a comma separator between each value. The syntax for using the string_agg
function is as follows:
string_agg([Column_Name], ',')
Steps to Pass Multiple String Parameters in Dashboard URL
To pass multiple string parameters in a dashboard URL, follow these steps:
Create a Data Source:
Begin by creating a PostgreSQL or Redshift data source. Within this data source, create and save a column using thestring_agg
expression. This column should be of string type.Bind Columns in Grid Widget:
After binding the necessary columns in the Grid widget, bind the created expression column in the Hidden Column section of the grid widget.Enable Linking in Grid Widget:
Go to the Properties tab of the Grid widget and enable the linking option. Append the createdstring_agg
expression column within the IN() operator to the URL parameter and the IN() operator is shorthand for multiple OR conditions.Preview and Test:
In the Preview mode, click on a grid row. The linked dashboard will open in a new tab, and the widgets on the linked dashboard will be filtered based on the passed parameters.
By following these steps, you can effectively pass multiple values as parameters to enhance the interactivity of your dashboards.