Skip to main content

Is it possible to Add a URL link (salesforce report) to a Metric? It is great to have the ability to display a Metric number via a query -- It would be great to have the ability to allow a user to click on the metric -- and taken to a salesforce report - -- Love the product!

1 answer
  1. Jul 8, 8:00 PM

    Hello Brad, and thank you for the kind words! 🙌 

     

    Great question. The Metric component doesn't have a built-in link property today, and the value itself isn't clickable, so you can't wire the number directly to a report. 

     

    But you can get that click-through behavior with a small tweak: drop a Button or Button Icon next to the metric, something like "View report," and wire its click to the Navigate interaction. Navigate can take the user to:

    • A web page: paste the report URL and choose whether it opens in the same tab or a new one.
    • The report as a record: set the page type to Record Page, object Report, and pass the report Id to open it natively in Lightning.

    Either way, you get the "click to my report" experience with the KPI and the action in the same card. If your metric is query-driven off a record, Navigate also supports {{Record.FieldName}} tokens so the destination can be dynamic. 

     

    I've submitted a feature request to make the metric value itself clickable. In the meantime, the button approach should get you what you're after. 

     

    Let me know if you hit any snags setting it up!

0/9000