I have a two level cross-company dashboard showing customers and their projects (“machines” to us). The idea is that you can select a customer and see their projects below; but I also want the ability to simply show all projects (unfiltered).
Part 1 dataview-filter-set
I’ve added buttons that use dataview-filter-set to override the filters on the dataviews (filter by customer or not), and I tried set-title to update the top title as to what’s happening:
I’m setting the filter in the filer by company to:
(CW_PROJECTS_1_0.Customer_CustID=CW_CUST_TEST_0_0.Customer_CustID) and (CW_PROJECTS_1_0.Project_Company=CW_CUST_TEST_0_0.Customer_Company)
(similarly “Show all” button sets the filter to empty string)
Sorta works: ie if I click filter by customer, it does indeed filter by the current customer, but if I then select another customer, the projects don’t change unless i click refresh on the bottom grid .
If I set the customer filter in the dashboard itself, then the bottom grid updates as i change customer. But if I set the filter via dataset-set-filter, it doesn’t ? I’m sure that earlier today it was dynamically updating when I selected another customer…
Part 2 transView: I tried to use a checkbox component on the child view to indicate if its filtering by customer or not (instead of the buttons), but I have no idea how to store and interrogate the state of the checkbox. ie how can I have a “filtered” variable? I suspect its to do with adding a boolean column to transView to hold this state and data binding the checkbox to that; however I was unable to do so.
Part 3 property-set: When I couldn’t get the checkbox working, I thought I’d change the caption on the grid. I was able to use set-title, but that changes the main title at the top, and I’m wanting to change “list of machines” to say “Filtered Machines”. I found property-set, and could associate it with the grid panel,
Then went into properties and selected Title, but ge value editor jumps into a json editor and here I’m lost as to what to do…
Is my Title just an arbitrary name I create, and the actual title setting is to be fully encoded in the json?