03-10-2024 05:53 PM
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?
Thanks for your help,
Christoph
Solved! Go to Solution.
2 weeks ago
Thank you very much Kenneth. This is exactly the kind of solution I was looking for.
3 weeks ago
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
04-10-2024 04:47 PM
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. 😞