Template and Field Search Syntax
Advanced search syntax can be used to look for all entries associated with a particular template, field, or field value. All advanced search types can be customized with advanced search operators and wildcards; in addition to the standard set of operators, you can use a comma to search for documents and folders that must satisfy multiple field criteria.
Template Search Syntax
- {[TemplateName]}
To search across any template, leave the Template name blank "[]".
TemplateName is the name of the template being searched for.
Field Search Syntax
-
{[]:[FieldName]="Value"}
Value is the field content you are searching for. To search across any field, leave the name blank: "[]", or to search for fields that are unpopulated, leave the Value blank: {[]:[FieldName]=""} (this is the only way to search for a blank field; wildcards will not return blank fields).
FieldName is the name of the field whose values are being searched for.
Note that the = operator may be replaced by the ~= operator if the field is indexed. See Indexed and Non-Indexed Fields for more information.
The following will find all documents assigned the Document field (whether it be an independent field or a field associated with a template) that begin with the text Maui.
- {[]:[Document]="Maui*"}
To find all documents assigned the Date field (whether it be an independent field or a field associated with a template) containing a value that occurs after May 27, 2004:
-
{[]:[Date]>"5/27/2004"}
Template/Field Search Syntax
- {[TemplateName]:[FieldName]="Value"}
Value is the field content you are searching for. To search across any template or field, leave the name blank "[]".
Note that the = operator may be replaced by the ~= operator if the field is indexed. See Indexed and Non-Indexed Fields for more information.
The following will find all entries that are assigned the General template, where the Document field begins with the text Maui.
- {[General]:[Document]="Maui*"}
To find all entries assigned the General template, where the Date field contains a value that occurs after May 27, 2004:
- {[General]:[Date]>"5/27/2004"}
Indexed and Non-Indexed Fields
For more information on administering field indexing, see Indexing Fields in the Laserfiche Administration Guide.
The following syntaxes will perform an indexed search for a field:
- {[]:[FieldName]~="Value"}
- {[TemplateName]:[FieldName]~="Value"}
The following syntaxes will perform a non-indexed search for a field:
- {[]:[FieldName]="Value"}
- {[TemplateName]:[FieldName]="Value"}
Note: If you attempt to use the indexed search operator with a non-indexed field, you will receive an error and will need to perform the search again with the non-indexed search operator.
Multiple Field Criteria
When searching for multiple fields/values, the following advanced search syntaxes are interchangeable:
- {[]:[Field1]="Value1", [Field2]="Value2"}
- {[]:[Field1]="Value1"} & {[]:[Field2]="Value2"}
The following advanced search syntax uses operators and will return a range of values:
- {[]:[Field1]>="Value1", <="Value2"}
Value is the field content you are searching for.
To find all documents with a Billing ID field between 6500 and 7000.
- {[]:[Billing ID]>="6500", <="7000"}
Date and Date/Time Search Syntax
The order in which the month, day, and year should be specified is determined by the short date format configured on your workstation.
Example: A date/time value is: 05/31/2012 09:45:13 AM.
Date or date/time search syntax
- {[]:[FieldName]="mm/dd/yyyy"}
- {[]:[FieldName]="mm/dd/yyyy hh:mm tt"}
Template and date or date/time search syntax
- {[TemplateName]:[FieldName]="mm/dd/yyyy"}
- {[TemplateName]:[FieldName]="mm/dd/yyyy hh:mm:sstt"}
Symbol | Description |
---|---|
dd | The desired day of the month. |
mm | The desired month. |
yyyy | The desired year. A four-digit year must be specified (i.e., 2004). |
hh | The desired hour. |
mm | The desired minute. |
ss | The desired second. |
tt | The time of day (i.e., AM or PM). |
Multi-value Field Position Search Syntax
When searching for a multi-value field, you can specify that you only want to return a value if it is in a particular position in a multi-value field list. To do so, you would use the following syntax:
- {[]:[FieldName](IndexPosition)="value"}
where FieldName is the name of the mulit-value field, IndexPosition is the position where you want to locate the value (with 1 as the first value, 2 as the second, etc.), and value is the value you are searching for.
The following example will find all entries where the "Destination" field has the value "Seattle" in the first position, regardless of template.
- {[]:[Destination](1)="Seattle"}
The following example will find all entries in the "Travel Request" template where the "City" field has "Chicago" in the second position.
- {[Travel Request]:[Destination](2)="Chicago"}
Parent Template Search
You can search for entries based on the template of their parent entry, using the following syntax:
- {LF:ParentTemplateName="name"}
Replace name with the template name.
The Template/field search syntax contains features that are additional to other advanced search syntax
- The entire syntax must be enclosed with curly brackets {}.
- Names of the desired template and fields must be enclosed with brackets [].
- If searching for a field that contains text, dates, or date/times, you must enclose the value with quotation marks. If searching for numbers, quotation marks around the desired number are optional. For example, searching for a field value of "3/28/1989" must be enclosed in quotation marks, however, searching for a field value of "4" does not require quotation marks.