View Selection Hierarchy Problem only certain children wanted

I have a customer database with documents and several response to response forms.

When I use Select form = “Customer” | @AllDescendants I get all my customers & contacts, actions, meetings, projects Etc. These are all forms in their own right.

I want to show a view that shows only customers with projects, and the project actions in a three level hierarchy without including the other forms like contacts & meetings.

Example

Joe Bloggs & Son (Customer Form)

 Project Number: 12345 (Project Form)

         Action: Load engin spec (Project Action Form)

         Action: Assign resources(Project Action Form)



         Action: Send paperwork to accounts(Project Action Form)

If a customer doesn’t have any projects then they shouldn’t appear in the view.

If I do a Select Form=“Project” | @AllDescendents everything shows up but not in a hierarchy. When I tick “Show response documents in a hierarchy” all records disappear.

Does anyone know how to do a view selection for this scenario?

Thanks in advance for your suggestions.

Subject: View Selection Hierarchy Problem only certain children wanted

“I want to show a view that shows only customers with projects”

Notes cannot sellect documents in a view based on the values stored in other documents.

If you only want to show Customers with Projects, you need some information in the Customer document to record if there is a project for this customer.

Subject: RE: View Selection Hierarchy Problem only certain children wanted

Thanks Graham, you pointed me in the right direction.

I have used @SetDocField($Ref; “ProjectFlag”; “Yes”)| @AllDescendants; in the Project form save button. And then a view selection of:

SELECT ((Form=“Customer” & (ProjectFlag=“Yes”)| Form= “Project”)|Form=“PAction” )

I will spend a little time trying to improve this but for the moment it works OK.