Tree-view like selection using checkboxes for search filtering

Hi,

Please see screenshot.

I am trying to make a custom search filter (tree-view like) that whatever items I’ve selected in the search filter will be displayed in my power table. - power table in the screenshot is not the results I want to display. I’ve just binded its data to template’s data so that I can see what’s going on in the dataset as I update the template repeater.

I’ve managed to create that using template repeater. Repeater composed of checkbox, label, button (with down arrow) and binded their corresponding properties to the custom properties in the repeater. Which I’ve displayed by creating dataset in the template repeater (data columns corresponds to the custom properties).

I’ve managed to access the checkbox component in the template repeater (by using the .getLoadedTemplates() function) that if I click on the parent checkbox, will check its child items- this is by manipulating the dataset and posting it back to data property of the template.

The problem I am facing now is I can’t access the buttonDown component that if I click on it, I should be able to manipulate the dataset removing its relative child items.

Is there a way to access this buttons separately?

I am new to Ignition as well as in this scripting so I’ve come up with manipulating dataset. Please let me know your thoughts on this.

Thank you very much.

1 Like

It sounds like you want to be able to dynamically set the buttonDown event script that runs on a button nested inside a template in your repeater. It needs to be dynamic so that each button correctly manipulates the dataset in its own way, right?

If so, I think you'll find this thread helpful:

1 Like

Hello, I believe I have a similar application and am hoping to get some feedback on how to utilize a checkbox template repeater as a filter. I have another template repeater that I would like to update which parameters are passed in on a per client view so without using a sql table for selecting enabled/disabled. If I use a refresh button script I think I can run a for loop to append a list of what’s selected and write that to a label component by using the getLoadedTemplates() function, but I don’t know if there is a way to better retrieve the selected checkboxes with an expression or other reference that would update themselves. Any thoughts are appreciated thanks.

We have found a way to get this to work, but I am having some trouble with initial settings on window open. I have a select all button that runs a script to select all the check boxes, but I would like the window to open in that state of all selected as well. So I made an inernalFrameActivated script to run the same function and select all checkboxes.

However, this script only works when navigating away from this window and then returning. It does not work when the window is opened for the first time. I’m thinking this is due to the checkbox repeater not having data available to run the script on the first open? Is there a way that I could get the window to load and then run the script so that components will be populated when the script starts?