This window title example first checks the return value of @IsNewDoc. If the document is new, the window title is set to the text constant "New Topic." If the document already exists, the window title is set to the Subject field if the current view is AuthorView. Otherwise, the window title is set to the Subject field followed by a string denoting the number of response documents.StandardTitle := Subject + @DocDescendants(" (No Responses)"; " (1 Response)"; " (% Responses)");
@If(@IsNewDoc; "New Topic"; @ViewTitle = "AuthorView"; Subject; StandardTitle)