The Laserfiche Search Engine is a very powerful tool to help users find the documents they need during their day-to-day business processes. Most of the time, the large number of preset search types available in Laserfiche will be exactly what you need, but there are times when advanced search syntax is useful.
Advanced search syntax
Advanced search syntax allows you to create various searches that are beyond the capabilities of the search interface.
Note: For all of the examples in this article, the following Laserfiche repository folder structure will be used:
Example: As Compliance Officer in a financial company, you need to make sure each employee has filled out and submitted a Non-Disclosure Agreement. You can use advanced search syntax to find all subfolders within the main “Employees” folder that do not contain a document named Non-Disclosure Agreement.
Advanced search options can be accessed from the Search Pane in the Laserfiche Client or Laserfiche Web Access. The easiest way to create an advanced search is by running a pre-existing similar query and displaying its advanced search syntax, which will then form the basis of your search.
Example: To create the search described above, you can run “Within Folder” and “Document/Folder Name” searches and display the advanced search syntax by also selecting “Advanced” from the “Customize Search” menu.
Now simply close the other search criteria and check the “Include advanced search criteria in query” box to modify the advanced query to suit your needs. Detailed syntax with specific examples can be found in this whitepaper.
This search example will return the following results:
Custom quick search
One place where advanced search syntax is particularly useful is for creating custom quick searches. Custom quick searches are accessed by clicking on the small magnifying glass icon on the upper right corner of the menu in the Laserfiche Client or Laserfiche Web Access.
They can be:
- Searches that users perform frequently.
- Specific to a user’s job function or department.
Example: As Compliance Officer, you frequently have to perform searches to make sure that users have submitted updated paperwork including Non-Disclosure Agreements, Trading Policy Contracts, etc. You can create a custom quick search using the advanced search syntax we created in the previous section.
Simply create your query using advanced search syntax as described above. Paste it into the “Customize Quick Searches” dialog box that can be accessed by clicking the magnifying glass button next to the “Quick Search” box in the Laserfiche Client or Laserfiche Web Access.
Use the token %(SearchTerm) to represent the user’s actual search term when the search is performed. Click “OK” to save.
This search will now be available from the Quick Search drop-down menu in the Laserfiche Client or Laserfiche Web Access. Type in “Non-Disclosure Agreement” and then select the “Missing Paperwork” search.
Just like regular quick searches, custom quick searches can be combined with other quick searches if necessary.
“Search Repository” activity in Laserfiche Workflow
Many organizations use advanced search syntax in conjunction with Laserfiche Workflow. The “Search Repository” activity allows you to search the Laserfiche repository and use the results in your workflows.
Example: As Compliance Officer, you are very busy and don’t have time to manually run the search to find employees who haven’t submitted Non-Disclosure Agreements. You can use the “Search Repository” activity inside a workflow to e-mail you a list of employees with missing agreements on a weekly basis.
- Drag the “Search Repository” activity onto the Workflow Designer Pane. When configuring it, copy the advanced search syntax that we created in the very first example into the “Search Query” property box.
- Next, use the “Assign Token Values” activity to create a new token called “Missing_Agreements” that will contain your search results. Don’t assign any values to this token and make sure to select the “Allow token to have multiple values” checkbox.
- Add the “For Each Entry” activity and configure it to work on “Output Entries”.
- Within this activity, use another “Assign Token Values” activity to assign the name of each employee to the “Missing_Agreements” token using %(ForEachEntry_CurrentEntry_Name). Make sure that you select the “Append to existing values” option.
- Finally, insert this token into an “E-mail” activity. In the “E-mail Editor,” click the “Tokens” button and select the “Missing_Agreements” token under the “Assign Token Values” entry. Then select “Apply Index” and “All values separated by Line Break.” Your final e-mail should look similar to this:Here is what the completed workflow looks like:When creating the starting rules for this workflow, schedule it to run at a particular time every week.Next Thursday at 9:00 am, you can expect an e-mail similar to this one in your inbox:
Benefits of advanced search
No matter how you would like to use it—whether to run a one-off search, add it as a frequently accessed quick search or make it a part of your business process workflow—advanced search is a powerful tool that will help you streamline and simplify day-to-day activities.