Dx Dashboard is unable to render dashboard contents with multi-value parameters upon click (from another dashboard) or reload
search cancel

Dx Dashboard is unable to render dashboard contents with multi-value parameters upon click (from another dashboard) or reload

book

Article ID: 442776

calendar_today

Updated On:

Products

DX SaaS

Issue/Introduction

We have multiple dashboards that uses "link" in the overrides section to navigate a user to a different dashboard on DX Dashboard.

Observing that the target URL which may contain multiple values for a dashboard variable is getting reduced to the last value upon click event. 

Steps:

  1. Click a dashboard button with a link added in via override. (Observe that the URL uses multiple value for a variable) 
  2. The user is navigated to a new tab.
  3. The URL navigation on the dashboard trims the variable values to one despite the override clearly states multi value. (The target dashboard allows multi-value)

Cause

The URL query string parser functions used direct key assignment (result[key] = value) when iterating over URLSearchParams, which overwrites duplicate keys.

Since browsers encode multi-select values as repeated params (e.g., var-Metrics=A&var-Metrics=B&var-Metrics=C), only the last value survives after parsing.

Resolution

Fixed in 26.5.1 and later

Additional Information

On opening a URL in a new tab, the app parses the query string into a plain object and stores it in the Redux location.query store. Because duplicate keys were being overwritten during parsing, the store only holds the last selected value for multi-select variables. The dashboard initialization then reads this incomplete data and applies only that single value to the dropdown. The same overwrite bug existed in three places: the startup parser (parseKeyValue in routesUtil.ts), the post-load URL change handler (getQueryParams in BridgeSrv.tsx), and the utility function (getUrlSearchParams in url.ts). The serialization side was always correct — the bug was purely in parsing.

All three parser functions were updated with a key-accumulation pattern: if a key is seen for the first time it is stored as a string; on each subsequent duplicate it is promoted to or appended into an array. This ensures var-Metrics=A&var-Metrics=B&var-Metrics=C correctly produces { "var-Metrics": ["A", "B", "C"] }. No downstream changes were needed since the template variable processing code already handled array values correctly.