cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[HOPEX 360] Default value for drop down list in a dashboard

CWaltking_ASP
New Contributor

Hello all,

Does anybody know how to modify a dashboard of HOPEX 360 to have a default value (other than nothing) in the "Portfolio" drop-down list ? I know values are coming from the JSON file of the dashboard, but how can I make one of the values a "default" value which is aleardy selected when I load the dashboard page?

CWaltking_ASP_1-1727970346156.png

Thanks for your help,
Christoph

 

 

3 Replies

Thank you very much Kenneth. This is exactly the kind of solution I was looking for. 

KennethB
MEGA
MEGA

Christoph,

Modifying the json used to create the dashboard does provide a mechanism for changing the dashboard, but only within specific limits.  Setting the initial value is not available here.

Caution: customisation like this may stop working after a HOPEX update.

Because the HOPEX360 generated website is ordinary HTML and JavaScript you can use very generic approaches: select the option you want through JQuery.

The code below will select a specific portfolio (you will need to change the Hex ID to the portfolio you want).

This code needs to be added to the JS section of the descriptor

<script>
  $(document).ready(function () {
    var portfolioDiv = $("div:contains('By Portfolio')");
    var selectAfterDiv = portfolioDiv.next("select");
    selectAfterDiv.val("E7C02F4366AB7856").change();
  });
</script>

Kenneth

CWaltking_ASP
New Contributor

I thought on modifying the _CodeTemplate "Applications Dashboard”, adding a line like shown above (the identifier is the one of the portfolio I would like to use by default filter), but it does not work. 😞

CWaltking_ASP_0-1728053168344.png