The Laserfiche 8.3 repository that I am working in contains a high percentage of documents and folders that have templates assigned but have all empty field values. I am trying to design a search that will identify them. Has anyone done that search?
Question
Question
Design Search for Empty Metadata Templates
Answer
This can be done using advanced search syntax:
{[TemplateName]}-{[TemplateName]:[]="*"}
This search is a template search {[TemplateName]}, combined using the NOT operator - with a search for any field in that template that has any value {[TemplateName]:[]="*"}
If you wish to create a search where only specific fields are left blank, you can do as Mike suggested. Note that you can combine fields from the same template with a comma for AND, like so:
{[TemplateName]:[Field1]="", [Field2]="", [Field3]=""}
This search looks for documents with template TemplateName, where Field1, Field2, AND field 3 do not have values. A comma is use to separate each field in the template.
Replies
You could probably do an Advanced Search with the following syntax:
{[TemplateName]:[FieldName]=""}
You could do that for each field and separate them by either the | (or) or the & (and) symbols. So if you wanted to see all entries where both Field1 and Field2 were assigned but blank, your Advanced Search Syntax would be:
{[TemplateName]:[Field1]=""}&{[TemplateName]:[Field2]=""}
The problem is that all fields in the template must be empty.
The syntax that I provided {[TemplateName]}-{[TemplateName]:[]="*"} works for me when I test it: all that is returned are documents that have the template with no values in any of the fields. The first clause looks for any document with the template applied, and the second clause excludes all documents that have any value in any fields.
If the search is not returning what you expected, can you post the advanced search syntax and explain what unexpected results you are seeing?