Not show documents that do not have responses

I am using @If@IsResponseDoc in a view to show documents and their responses based on a field in the response docs. I would like to not show documents that do not have response documents. Is there an @command or a way to do this?

Subject: not show documents that do not have responses

There’s no simple way to do that. Response documents do know about their parent (more precisely: the only thing they know is their parent’s document unique id as stored in $REF), but parents know nothing about their children.

Since a view selection formula can only select (or skip) documents based on information stored in the document itself, you have to implement some mechanism, that writes to the parent, whenever a response is created or deleted.

Subject: RE: not show documents that do not have responses

and in most cases teh client creating the response will (should) have Author rights so they can not write directly to the Parent. So you will have to do this as a back-end agent perhaps triggered by “New or Modified”. I really don’t like that trigger, but it is the best you have. However, that will not trap deletions so you will need to do something with that as well.

A way that we have handles something like this was have the save and delete event on the form create a transaction type document that contains enough info so that the back-end agent can process it. You will have to watch out for Save/Replication conflicts especially if the DB has any replica copies on other servers. One way around this is to enable the background agent to run on only one server, but the process will always be a little bit behind because of replication intervals.