Metadata Menu filter by attribute

What I’m trying to do

I defined a PersonCls class which I assigned to the notes created in the Person folder.
The PersonCls class has a bool attribute IsGroup.
One of the fields in the class is MultiFile RefGroup, it is currently only filtered as dv.pages(‘’Person‘’) but I would like it to only list notes contained in the Person folder with attribute IsGroup=true, assuming the field exists.
And I would also like it not to list notes contained in Person/* subfolders.
How should I modify the Dataview query filter?

Things I have tried

dv.pages(‘’Person‘ & file.PersonCls.IsGruop=true’)

this might work to get you started:

dv.pages('"Person"').where(p => p.IsGroup)

NB: folder name must be in ‘“single AND then double quotes”’ as in code eg above.

p.IsGroup evaluates to “true”

Not sure how to limit to main folder. Maybe filter results on other properties(attributes) as well,

dv.pages('"Person"').where(p => p.IsGroup && p.type == "MyType" )

hope that helps!

You are right, I had rewritten the code by hand and forgot the quotes, but in my field definition they are there.
However, adding the where did not work: now trying to add a value to RefGroup shows an empty list.
p.type can’t work: unfortunately, the class is also automatically assigned to subfolders.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.