View.AddFilter weird problem?

Hey, this seems like it should just work. But it doesn’t and I don’t know why.

It’s simple : I have a flattened list of 16 views, and a flattened list of 16 ParameterFilterElements (which filters are all made by OOTB nodes)

Now when running this script it applies 4 filters that correspond to the floors/dependent views that both lists are grouped in, before flattening. The way i want it to work is just to apply the list of filters to list of views, one filter per view. Tried with different lacing modes - didn’t help

I feel there is a quick fix but i’m stuck :frowning:

here’s a whole workspace

Try using list levels with both inputs @L1.

Not sure exactly where to put inputs at @L1 ?

I’ve tried on :

  • both List.Flatten set to @L1 on list input
  • View.AddFilter both inputs set to @L1
  • FilterRule.ByRuleType value and parameter inputs set to @L1

none of these combinations work - I still get 4 Filters per view corresponding to Levels :frowning:

bump’d

Can you share your dyn?

ViewFilters_Test.dyn (26.8 KB)

i’ve been trying to look into solutions from this thread but it’s a slightly different problem there

So i’ve tried to solve it with my friend, who actually knows Python and he helped me out a lot, but in the end I think we ended up with reverse-engineering the OOTB node “View.AddFilter” (as seen on screenshot below).

The result is the same as if I used OOTB node - it appends a number of filters corresponding to the levels of the views. This got me thinking - maybe because I try to add these filters to dependent views - which “parents” are tied to levels in project - is the answer why it keeps adding them sorted by level.

I’ve changed the node from Clockwork’s duplicate.as.dependent to just duplicate - now it does apply filters the correct way - but on independent views.

It’s okay, but is there a way to apply just one filter per dependent view?

That’s the whole point of dependent views. They’re dependent on each other.

Can you set variable filters on each of these views in the UI?