Hi All, I am trying to launch a dashboard containing 2 BAQs via REST. I can construct the URL to launch the dashboard. This works, however, I would like to be able to pass either a filter or parameter value that will cause the launched dashboard to display only the filtered data.
The ultimate objective is to be able to launch this dashboard from a separate (C#) program and have the dashboard open with the filtered information. Again, launching isn’t a problem. Passing the filter value is elusive!
Thanks in advance for any ideas on how I might accomplish this.
Dashboards/custom apps are the only ones where you need to initialize and add anything.
On the standard forms, KeyFields is already there and you can send it whatever column and it will add it on the fly to the DataView.
It also seems to have to be KeyFields and not some other DataView as I believe there’s some JS magic happening in that ugly main.js file that scrapes those.
Well I thought I had all I needed. I’m guessing there’s something else required between adding the dataview and adding “?KeyFields.whatever…” to the URL.
That ‘vast middle ground’ might include linking KeyFields to another dataview in a parent/child relationship so that when KeyFields receives the URL value, it gets passed to the dashboard dataviews? Maybe KeyFields needs columns defined to match the Tracker view with the prompt field?
@hmwillett, I’m sure you assumed I’d know exactly what to do with the great writeup you provided (I thought so too!!) Do you mind adding a bit more fill to the blanks?
But as far as the Row-update, I was completely guessing as to what was supposed to be going on there. Following the images in your post, I constructed the following:
I chose to specify an actual value as a last resort - this didn’t retrieve the desired results, either. The EpiBinding uses the field name that was assigned to the prompt…
Yup. That just happened to be what I used off the top of my head.
See below for an even more arbitrary column name.
I mean, it has some unrelated ones from this test. Initially, I bound KeyFields.PartNum to a textbox for demo purposes, but I removed it and you can see it still working.
Lol! Pancakes=AreBetter. But anyway, it looks like I have a bit of debugging ahead. Thanks for the major headstart, though! I’m sure with a bit more trial and error, a delicious breakfast is still possible.
By the way, your layer is named “Broadcast” or is that something significant?!? (When working with dashboards, publish/subscribe, the term broadcast seems like something I should pay attention to)
Lol, it’s my layer name because I was playing with the broadcast event. Not to be confused with ?Broadcast=1 which allows for inter-app communication on the broadcast channel.
It occurred to me I didn’t quite close the loop on this topic. So, thanks @hmwillett for the solution. As I was dealing with a dashboard that ALSO incorporated publish/subscribe between the queries, I had to add a bit more logic.
So Hanna’s post enabled me to receive the parameter which I then, through the magic of App Studio, used as a filter on the “publishing query” thereby affecting the “subscribing queries”. It works like a charm.