I am rebuilding my classic dashboards in Kinetic. Our users prefer the panel card stack instead of views and this allows different column selections for each of the tabs of the panel card stack.
Here’s what I’ve done.
Setup data view
Create each of the panel card grids for the views that we use, bound to the same data view (this allows other grids on the dashboard to subscribe to a single data view), but with different where clauses on the BAQ in the provider model.
Setup columns, column widths etc for each panel card grid
Add all the panel card grids to a panel card stack.
So everything works with this setup, except refreshing the data view. The first time each tab in the panel card stack is selected, the data refreshes and all is good. But every time after that it does not refresh, so it leaves the wrong data in the grid.
All I need is an event trigger to refresh the data view with the correct BAQ where clauses for each tab in the panel card stack and it’ll work just like in classic, but I can’t find anything in all the events.
This isn’t going to do what I think you want it to do.
By using the provider model on both with a where clause and setting to the same view, you’re essentially replacing the dataset with which ever one runs last which is why you’re not seeing the refresh happen the way you think.
What you should be doing, instead, is you can set them to run via the provider model and set the epBinding to your view, but you should be setting up views under Properties > Advanced to filter the data on the client side for each grid.
This will allow you to maintain a singular dataset, but show filtered data per view.
Now I guess I have to wire up the refresh events to refresh both the data view and the affected grids or the client filters won’t affect the data.
It was so much easier for us non-developers to work with classic dashboards. App Studio has so many fields to fill, in different places.
Are there any resources that explain how to decide when to use client filters or where clauses and the difference between setting up the provider on the grid vs the views?
Client filters are used when you want to pull the entire dataset back from the server and then filter it locally. This is done when, like your example, you have multiple grids that use the same view. Use a Where Clause when you want to pare down the amount of data coming back from the server to display only what you need. Think of a Part Transaction History dashboard. Use a Where Clause to filter on the PartNum so as to not time out your call from having too much data.
Grid Model vs Provider Model
Mmm, these feel a bit like preference and how much effort you want to put into the setup. If you use the Provider Model, it will retrieve data when the grid is expanded and does not require any DataViews (if you don’t want). Using the Grid Model will require you to bind it to a DataView and then create events to populate, refresh, clear, and manipulate the data. It gives you a bit more control over when things happen and how they happen, but it’s also more involved with the setup.