You are viewing limited content. For full access, please sign in.

Question

Question

Advanced Search Syntax to Search for Documents Without a Non-Template Field Added

asked on September 2, 2015

I have Workflow adding a field to certain documents that is not part of a template.  I am able to search for documents that have this field added with some value but cannot figure out the syntax to search for documents that do not have this field added.  Initially I thought I'd try something like these:

  • {[]:[Non-Template Field]=""} & {LF:Name="*", Type="DB"}
  • {[]:[Non-Template Field]<>"*"} & {LF:Name="*", Type="DB"}

 

These two returned no results and I think it is because technically if the field is not part of the template and is blank, then it is never associated with the document in the first place.  Does anyone know of a way to search for documents that do not have a non-template field added to them?

1 0

Answer

SELECTED ANSWER
replied on September 2, 2015

I agree with your conclusion.

 

If you:

  1. manually try to add a field, which isn't part of a template, and don't assign it a value
  2. click OK
  3. Re-Open the document
  4. The field previously added will not be present

 

To search for documents which do not have a field template added to them, you'll have to do a very exhaustive search and then substract the search set which does have the field added.

 

IE:

{LF:Name="*", Type="DB"} - {[]:[Non-Template Field]=*}

2 0
replied on September 2, 2015

While I wish there was an easier way, I really appreciate the option provided.  Fortunately, I am searching through individual folders that only have 1000-8000 documents in them so it takes 5-30 seconds to run the query.  This would definitely be an issue if I was searching through the entire repository of 200,000+ documents.  Thanks again for finding a great solution!

0 0
replied on September 2, 2015

Great to hear! Glad it'll work

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.