Rest launch Kinetic Dashboard with filter value

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.

Populate the grids via function instead of BAQs.
You can run the BAQs in the function.

Some good threads on here lately that are relevant.

2 Likes

Add a dataview called “KeyFields” to your receiving dashboard layer.

Initialize it after form load.

Then you can send it in the URL and it will receive it.

https://<server>/EpicorKineticGold/Apps/ERP/Home/#/view/KASGKLJ/Ice.UIDbd.Part%2520Type?channelid=396fd892-2bcc-4452-a7a2-d8012aefe83f&layerNames=Broadcast&company=C001&site=038&KeyFields.PartNum=12345

I appended the &KeyFields.PartNum=12345 to the end and the form receives it when the URL opens.

DeepLinkingParams

3 Likes

Well that’s damn cool.

Yeah, it’s kinda neat.

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.

Thanks @hmwillett. This is truly appreciated and is exactly what I was looking for.

1 Like

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?

You’re gonna have to go into more detail about how you’re doing things, because it seemingly works fine for me.

DeepLinkingParamsExternal

Thanks! So I have a basic dashboard with tracker view. A single prompt field “JobNum”.

In App Studio, the app looks like this…

As your post describes, I simply added the dataview.

image

I didn’t add any columns. I did add the Window Load event method…

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…

So, I threw this together without really know what needs to be connected to what in order for it to work.

My guess is that I have to add a bit more definition to the KeyFields dataview. At present, it’s just ‘hanging out there’ unrelated to anything else.

Nah, mine is empty.

You said you were launching this from an external application?
How is that calling the dashboard?

At present, I’m just using the URL. Once it works, the external program will simply construct a url and launch a web page pointed to that URL.

How did you decide to call the column in KeyFields PartNum? Arbitrary?
And does your dashboard have a prompt field (with a name)?

Thanks.

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.

If you have Dev Tools Open and Debug Mode active, you should see the deep linking column change message.

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)

argue drag race GIF by Shalita Grant

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.

Typing is almost as hard as naming things.

And I’m amazing at both.

barney stinson tru GIF

Okay. Time to follow the lead of that post. Happy 4th y’all.

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.

1 Like