November 8th, 2010
Tech Tip: Searching for Multiple Value Fields
With Laserfiche 8 came multiple value fields, which enable you to store more than one value per field. For example, if you have two people who authored a document in your repository, you can add them both as authors of the document in the same Author field. You can also perform a variety of different multiple value field searches using the advanced search syntax. To access the Advanced Search syntax, select Advanced from the Customize Search menu in the Laserfiche Client, and select Include advanced search criteria in query to type in the text box.
To search for documents that have exactly two specific values in a multiple value field, you would use the following syntax.
- {[]:[field]=(“fieldvalue”, “fieldvalue”)}
For example, to search for documents with a multiple value Author field containing only Bill and John, the syntax would be:
- {[]:[Author]=(“Bill”,”John”)}
This search will return all entries assigned the multiple value Author field containing exactly Bill and John. If this multiple value field also contains another author, the document will NOT be returned.
To search for documents that have two specific values in a multiple value field, plus any other value(s), you would use the following syntax.
- {[]:[field]=”fieldvalue”}& {[]:[field]=”fieldvalue”)
For example, you want to return all documents that Bill and John worked on with other people. You would use the following syntax.
- {[]:[Author]=”Bill”}&{[]:[Author=”John”}
This search will return all documents assigned the multiple value Author field containing Bill and John, as well as any other author(s) regardless of who the other author(s) might be. If this multiple value field also contains Connie and Roger, the document will be returned.
Note: You can use the same syntax in Web Access to search for multiple value fields.
