Hide a section when the document has no childen

Hello,

This is my 1st message here, and I hope my question hasn’t been submitted hundred of times… here it is :

I’m developping a Notes Application that acts as a kind of forum.

Each parent document contains a section with and embedded view showing the title of the answers to this document.

I don’t want this section to appear as long as the document has no answer.

How can I hide it ? @DocChildren can’t be used in such situation.

I imagine that I could create a hidden field to hold a counter, and to update this counter whenever a reply is created or deleted, but it seems an awful lot of work just to know if there’s a reply to a document…

Any advice ?

Subject: Hide a section when the document has no childen

Use @DbLookup to see if the parent document contains any responses. You may need to create a new view to do this, although it’s possible that the same view you are using to embed in the form may also be used.

If the lookup fails to find any documents, hide the embedded view.