Query to find things in a nested structure

Hello,

I’m pretty sure this is an easy fix, but it would take me hours to figure out, which I don’t have at the moment.

I am restructuring the second draft of my novel. The notes are in the following structure:

Level One: MS
Level Two: Act
Level Three: Chapter
Level Four: Scene

Most chapters have several scenes.

What I want to do is pull out all the scenes from one Act to work with them.

I created an agent and used this query:

inside(/Second Draft MS/ACT ONE/Chapter)

What is returned is the scenes from the first Chapter in Act One, and I need all the scenes from all the chapters in Act One.

Could someone please tell me how to modify the query to do that? Thanks a lot. Michael

‘ACT ONE’ or ‘Act One’? Name/Path data are case-sensitive. I’ll assume ‘Act One’.

Try:

descendedFrom(/Second Draft MS/Act One) & $OutlineDepth(original)==4

An approach that might help, going forward, is to make prototypes for Acts, Chapters and Scenes. Thus you could do something like:

descendedFrom(/Second Draft MS/Act One) & $Prototype=="pScene"

1 Like

Thanks Mark; I do have prototypes for each, but have a prototype for each POV which inherits from the Scene prototype. I have figured how to get from one POV, with descendedFrom(/Second Draft MS/Act One) & $Prototype==“Clark POV”, but I can’t figure out how to get for additional prototypes.

So assume I had two scene prototypes how would I get both of them?

Thanks a lot.

I just figured it out using this query:

descendedFrom(/Second Draft MS/ACT ONE) & ($Prototype==“Clark POV”|$Prototype==“Lalia POV”)

Thanks for the guidance

2 Likes

Absolutely. A | (pipe) symbol denotes an ‘OR’ join, i.e. match either term. An & (ampersand) denotes an ‘AND’ join, i.e. march both terms.