When using the Discussion templaten, the form “Main Topic” holds the value of @Docchildren in the Window Title.
The number of responces are thereby displayed when reading the document.
If I make a search in a flat view and read a document with 5 responses, the title shows, that there are non.
The help does not say anything about @DocChildren not working when used on a document in a flat view.
Any solution or comments to this?
Subject: @Docchildren and flat view / search view
@DocChildren <> Response documents.
DocChildren is the number of documents that are directly “below” this document in the category hierarchy. As there is not hierarchy in a flat view, there are no children.
I’m not sure if @Responses would work for you ?
Subject: RE: @Docchildren and flat view / search view
Where do you see that the @DocChildren can only be used in a category hierarchy?Reading the help does not indicate this at all.
Charlotte
Subject: RE: @Docchildren and flat view / search view
@DocChildren
In a column or window title formula, returns the number of child documents or categories belonging to the current document or category. Only immediate responses count as children. For example, the responses to a main document are its children, but the responses to a response document are not.
In a flat view, there are no Child documents or categories.
Subject: RE: @Docchildren and flat view / search view
No, Offcource there are no childs or cats. in a flat view.But the documents still has both childs and cats. even if the doc is in a flat view.
I guess your are rigth in your assumption, but I still think that Lotus has not been clear on this.
Anyway: Do you think, there is some way to display the information even in a flat view?
Ps. Thanks a lot for the answering.
Subject: RE: @Docchildren and flat view / search view
“But the documents still has both childs and cats. even if the doc is in a flat view.”
Sorry, but no it does not. There is no information in a document that relates to other documents in a database, with the single exception that response documents have a pointer to their parent.
All of the @Doc… functions are view functions, which base their information on the view indexes, not the documents themselves.
Let’s get back to basics. I think your requirement is for Documents to know the number of direct Response documents that they have. This is not built into Notes, but could be programmed.
You would have to do something along the lines of …
Whenever a new response is created, increment a counter in it’s parent. That’s relatively easy to do.
Whenever a response document is deleted, decrement that counter. That’s going to be tricky. The QueryDocumentDelete event in the Database Events would be your best bet.
You might also consider a nightly refresh agent to ensure all of the counts are up to date.