Master Detail dashboards: show all vs show filtered and "property-set"

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…

image

Is my Title just an arbitrary name I create, and the actual title setting is to be fully encoded in the json?

For the filtered views, you should use the View Options for this.

1 Like

No need to use JSON; don’t let the default brackets scare you off.

1 Like

Thanks Hannah, nailed it. I added extra grid views into the dashboard and bingo they miraculously appear and work as expected:

I’m now getting dangerously close to producing something halfway useful.

While I now know the correct way to manage views, I’m still stuck on the application studio stuff.
eg, if I did want to add a checkbox to do something and store the state of the checkbox in a “application local” variable, is that possible? And is that what TransView gets used for?

Yes and yes.

cool… do I need to add “columns” via the dataviews editor, in this case a boolean column? I wasn’t able to do so.
I add a column but it won’t let me set the data type to boolean. I haven’t setup anything in Server View or Options… anything required here?

Nope. The beauty of TransView is it’s all done on the fly.
Just use the row-update widget and set the EpBinding to TransView.WhateverYouWant.

1 Like

Too easy… thankyou.

1 Like

I’m still having issues with property-set, in my trivial exampIe click a button and change the button’s caption to “clicked”:

Click it…
image… but the button caption doesn’t change.

At least I’ve discovered the debugger! :exploding_head:

The property is likely wrong.
Try one of the following:
LabelText
labelText
label
text
Etc.

I don’t know what it is off the top of my head, so you’ll have to play around.

1 Like

I had tried several combinations, and had about given up when I came across your post on debugging tools, could see from looking at the elements and their properties that its labelText :+1: Property names appear to be case-sensitive also, which I didn’t previously appreciate.

1 Like