Kinetic Pub/Sub/Sub

I have a dashboard I am developing that creates a relationship between several groups of data based on a primary record selected, publisher/subscriber. The problem I am experiencing is that this relationship goes a level deeper and changing the selection at the top level does not change the data at the Sub/Sub level. Here is the basic setup:

Main data - List of open Projects (BAQ - no parameter)

2nd Level - List of Jobs associated to the selected Project (BAQ - with parameter) - using the ProjID as a parameter to fill the list of jobs, triggering on the Dataview/Row change event of the Main data.

3rd Level (BAQ - with parameter) - List of materials for the job, associated to the selected Job - using the JobNum as a parameter to fill the list of materials, triggering on the Dataview/Row change event of the job list.

This all kind of works but when I select a different row in the Project list, the Job list refreshes as expected, but the material list does not refresh until I change the selected row in the job list. I assume it is because I am using the row change event for the job dataview but there does not seem to be a better option to select for the dataview.

What would be a better event to refresh the 3rd level data when the top level data selection changes?

I hope this makes sense - if not, let me know what else you need to help out.

Thanks,
Ed

Both on top and 2nd. So I’d make your 3 refresh events have No Trigger. Then on top rowChanged event-next both refresh 2 & 3. And on 2 change event-next refresh 3.

1 Like

If you use Provider Model this should work. We have a dashboard similar to this that works with like three subs deep (Projects - Orders - Jobs - Shipments)

2 Likes

Yes. ProviderModel will make the refreshes automatic using Baq Options WHERE but BAQs with Params are a bit trickier, I believe. :man_shrugging:

1 Like

Another option is to trigger on table column changed instead of row changed. Jobs.JobNumOnChanged for example.

This is exactly what I needed - thanks. I don’t think the provider model would have worked because I am using parameters but I didn’t try it. This was the first thing I tried and I liked that it gave me a refresh event that I could do other things with like test to see if there were any jobs in the list before I tried to get the list of job materials.

Thanks again,
Ed

2 Likes

You might still switch over your triggers from view.rowChanged to table.columnChanged instead. The problem you were having is Jobs stays on row1 after refresh so Materials never refreshed because row never changed. You want to refresh when Jobs.JobNum changes regardless of what row is selected. Even if it’s working you can sometimes refresh too often like if there are 3 rows per JobNum in grid2. I know this isn’t your case, but just good practice to trigger on change of your criteria column.

1 Like