A View to Remove Documents which are included in Document Collections

Dear Forum, 

I have a document class called email correspondence. This email correspondence links to a particular asset which is an Object.

Within this class I want to create document collections to view my emails by major topics.

I have successfully created some document collections. And now I want to create a view which shows only my emails which are not already in document collections.

I already have a view that shows me the document collections. 

Can anyone provide some advice on what filter settings I might use to achieve this. Is it even possible?

Many thanks and regards,

Parents
  • I'm not entirely sure that will be possible, at least directly.  The issue is that it is the Document Collection which has a property on it which points to the Document; the Document (which you want to list) has no direct flag on it that you can use to filter.

    You may be able to use something like Managed Properties (although I have not tried it with Document Collections) to persist the relationship in the other direction, but I still think that's not a complete solution (as the documents not in a collection won't have a property on them to allow you to filter!).

    Is there a reason why you do not have a property on the Document itself which points to the asset/topic?  If this were a property on all document classes then this would then allow you to have a simple "where topic is empty" sort of filter to find all documents where there is no topic.

  • Thanks for the reply to answer your qu. yes I have a property on the document itself, and it is connected to the asset object. Every email in this case is connected to the relevant object. I hope this makes sense! Let me know if i can further clarify...

  • I can't quite picture what you have configured (i.e. was the asset point separate to the document collection point)?

    If you want to list all documents that do not have an asset then the key here is probably that the "is empty" filter doesn't match objects that do not have the property at all.  This often trips people up, and the only way around it is to ensure that all of your document class definitions contain the "asset" property.

  • Hi Craig,

    Hope this helps to clarify:

    • Every document is an email and connects to the asset here
    • Some documents are further grouped in the sense that they have been added into a document collection. Therefore, not listing the asset does not provide the required view.

    I am using extended views and am basically trying to create one view showing document collections which is already done. The second view I would like to create would only show the emails that are not in the document collections, and this is the part I can't figure out.

    One workaround would be be to to give every email which is not in a document collection a keyword and then filter by this, but that seems messy. I was hoping for a better means to create the view.

    best regards, 

  • The issue is that the "is in a document collection" flag exists on the document collection (the collection points to its members), not on the document itself.  Therefore there's nothing natively that you can use to filter the list of documents.

    I guess that it would be possible to add a property to add documents that has the value of "Is in document collection: False".  This property would need to be on all objects.  You would then need to have some script created that, when a document were added to a collection, the document were checked out and the value changed to "true".  The filter then becomes simple ("is in document collection = false").

    The script would need to deal with a reasonable number of edge cases, though (e.g. when a document were removed from the collection, or when a document is added but checked out so cannot be modified, etc.).  I don't have such an example script available, unfortunately.

Reply
  • The issue is that the "is in a document collection" flag exists on the document collection (the collection points to its members), not on the document itself.  Therefore there's nothing natively that you can use to filter the list of documents.

    I guess that it would be possible to add a property to add documents that has the value of "Is in document collection: False".  This property would need to be on all objects.  You would then need to have some script created that, when a document were added to a collection, the document were checked out and the value changed to "true".  The filter then becomes simple ("is in document collection = false").

    The script would need to deal with a reasonable number of edge cases, though (e.g. when a document were removed from the collection, or when a document is added but checked out so cannot be modified, etc.).  I don't have such an example script available, unfortunately.

Children