Best way to add a selectable parameter to dashboards?
My approach in my head is to create an HTML widget at the top of the page with a dropdown list, and have it add a querystring to the page for that param (refreshing the page, unless that can be avoided). So if they chose "1" from a list, the url of the current page would be appended with ?myParam=1.
Is there a simpler, more elegant way of doing this, perhaps?
The benefits of doing something like this include not re-creating the same dashboard with different variables, letting the user quickly switch between views, and not cluttering the menu up with 50+ versions of essentially the same dashboard. I would pursue this for any one of those reasons, let alone all of them.
Best Answers
-
Justin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭I don't know if there's a more elegant way using only the OOB widgets. Your idea seems sound. I did something similar with just links in the top HTML widget. You could always build a custom page
5 -
Justin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭Tom, I've been experimenting with a similar concept trying to replicate what you were after. I found that the HTML widget would strip the Id off of DIVs, but I could use a class for a DIV and find my elements that way.5
Answers
Thanks for confirming what I suspected though.
I'll proceed this way and see how it turns out!
Yes it does. Before I read your comment above, i was going to suggest a custom page. Go on, you know it'll be awesome!.
In all seriousness, I can't think of another way, other than the hyperlinks already mentioned.
Geoff
If I could just trigger a change event on a dropdown list or textbox, that would be outstanding. Is there any viable reason not to do this?
A custom page is an option, but I would honestly rather write custom code that looks for these HTML widgets, interprets what is in them, injects what is needed, and essentially "fakes" the presence of actual functionality. Do not mistake this as me saying that this is a good idea. It is merely the best available that I am aware of.
Is there, perhaps, an easy way to get dashboard widgets into a custom page, that I could teach someone with no coding experience? If coding is necessary, then it all falls on me instead of being shared work.
So for lack of a simple/efficient way to construct a custom page that contains editable dashboard widgets, I have opted to add text "tokens" to an HTML widget and I have an observer that, if it finds one, will replace it with functional HTML/script. I am actually surprised at how quickly and efficiently this runs, and I end up with what I wanted, just not anywhere close to the way that I wanted to get there.
It is somewhat clunky compared to if I was able to put "real" HTML into the HTML widgets, but it works. I also have to define my replacement HTML in a file so that means I have to schedule a release to make any changes. However, it does work well in spite of all of this.