Filtering a Category via Scripting

230 viewsScripting


Has anyone had any luck with filtering a category in the tray with items that are in groups?

For example, I’m trying to filter the GRP category in the picture below to select Group 1 so that my filter items are only showing Sub1, Sub2, and Sub3.

Any help is greatly appreciated.

Thanks, Andy

Montecristo Unselected an answer May 10, 2024

P.S.: Are you aware of the Idea portal, where you can post enhancement requests?


Hi Montecristo, I am not sure if you need script for that. I assume you would like to be able to choose which group to filter. To achieve group filtering you can use expression in cell filtering and constrain input to select which group to filter.

Expression in E1 cell filter: @level(F;1) = Matrix5::

Expression in Constrain input in Select group: @level(Matrix3::F;1)


Gilbert Posted new comment May 11, 2024

Again, cool demonstration of what cell filters can do.

I assume that Andy WANTS to use script, to force a certain look on the matrix.
But also your solutions is able to be scripted: just set the value of the Selection Cell on the right by script – and all done.
If you use collapse or cell filter has probably a very similar result.
@Andy: Hope you’re happy with one of these two solutions. Could you please report back what you did choose and why?


Hi Andy,

I think category filters are not accessible by script, unfortunately. (As a lot of other interesting features are not, it just seems that most people do not use scripting, so incentive to further develop the scripting methods and properties is too small).

As a workaround, you could use the collapsed / expand feature, which in turn is scriptable.

This code snippet might get you started:

|Matrix1::GRP|.children.each { ThisItemOrGroup ->
  if (ThisItemOrGroup.children != null) { // it's a group
       if ( != "Group1") {ThisItemOrGroup.collapsed = true}
       else {ThisItemOrGroup.collapsed = false}

Hope this helps,


Gilbert Edited answer May 9, 2024