Tinderbox Forum

Query to exclude notes that contain children?

HI

I am in need of a little help in writing a query to exclude notes in a container. The folder in question is called “/Data” has a relatively flat structure but does contain some notes that have children. These are the notes I am trying to exclude.

I am using the inside("/Data") which is selecting all the notes as expected but I am having trouble writing the rest of the code to exclude those containers with children

For Example:
/Data
Note1
Note2
Note3
childNote1
childNote2

I want a query to include only

Note1
Note2

Thanks in advance
Tom

Try adding:

& $ChildCount(original)==0

Works like a charm! Thanks Mark.
Tom