PROBLEM
In ArcGIS Dashboards, when URLs stored in an attribute field are configured as hyperlinks using advanced formatting within a dashboard element, clicking the link redirect to the dashboard view page instead of opening the intended web page. The image below displays an example of the issue on a dashboard view page, with the browser status bar preview showing an incorrect URL when hovering over the configured hyperlink in a table element.

The URLs stored in the attribute table do not include the https scheme, causing ArcGIS Dashboards to recognize the link as a relative URL to the dashboard, hence redirects to the dashboard view page.
This workaround modifies the original attribute data and is recommended when updating the hosted feature layer is feasible.
and click Calculate."https://" + $feature.<field name>
The correct URL is displayed on the browser status bar preview when hovering over the hyperlink in the table element on the dashboard view page.

This workaround applies the missing https scheme to the URLs in a specific dashboard element by updating the advanced formatting expression and is recommended when retaining the original attribute data in the hosted feature layer is necessary. In this example, the hyperlinks are configured in a table element.
.var <variable a> = Concatenate("https://",$datapoint.<field name>)
var <variable b> = '<a href="' + <variable a> + '" target="_blank">' + $datapoint.<field name> + '</a>'
The code below is the full displayText property assigned with the final variable from Step 3(b). In this example, the variable, set as final is assigned to the Ref_Img column.
displayText : final,

Note: Optionally, remove the unrelated properties from the editor.
The following shows the complete expression used in this workflow, with the unnecessary properties removed from the expression.
var scheme = Concatenate("https://", $datapoint.Ref_Img)
var final = '<a href="' + scheme + '" target="_blank">' + $datapoint.Ref_Img + '</a>'
return {
cells: {
NCESSCH: {
displayText: $datapoint.NCESSCH
},
NAME: {
displayText: $datapoint.NAME
},
Ref_Img: {
displayText: final
}
}
}

> Save to save the changes.The correct URL is displayed on the browser status bar preview when hovering over the hyperlink in the table element on the dashboard view page.

Article ID: 000039554
Get help from ArcGIS experts
Start chatting now