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

Question

Question

Search for Folder with Template Field Value

asked on January 8

We are self-hosted, running Laserfiche 12. I need to find a sub-folder, based on a template field value. I am trying to use the Workflow Search Repository activity and am having a problem with the syntax. 

I have:

         {LF:Type=F} & {LF:LOOKIN="\Client\ActiveClients\"} & {[Client Folder]:[ClientNumber]="123456"}

Where

         Repository = Client

         Folder = ActiveClients

         Sub-folders = ClientName (one per client - not used in syntax)

         Template = Client Folder

         Search field in Template = ClientID

Any suggestions will be greatly appreciated.

0 0

Answer

SELECTED ANSWER
replied on January 15

That's probably because you have a "-" instead of "&" after  {LF:Name="*",Type=F}

So the search changed to "all folders except the ones under Active Employees..."

0 0

Replies

replied on January 8

Does it work if you copy that into the Web Client search filter "Search Syntax"? 

A shortcut that I use is to create the search in Web Client using the search filters, then copy the search syntax into the search activity in workflow.

1 0
replied on January 8

Maybe it's a typo, but your description says the field is "ClientID" while the syntax uses "ClientNumber". Assuming that's not it, I would test each individual component of the query and confirm that it returns expected results. Select a target folder to find and verify that it is included in each of the result sets. Then start combining the clauses with "&" and confirm that the target folder is still present.

0 0
replied on January 8

It's a few of things:

  • You have an extra backslash in front of the repository name in the path:  {LF:LOOKIN="\Client\ActiveClients\"}
  • the search syntax for type is {LF:Name="*", Type="F"} 
  • the field name may or may not be correct (ClientID vs ClientNumber)
0 0
replied on January 15

Maruna,

Please take a look at my replies to my original post and see if you can provide any additional direction.

0 0
replied on January 15

I was pulled away for some other tasks.

I changed ID to NUM so as not to confuse with the Laserfiche entry ID.

Maruna's reply was the closest to an answer.

I tried this on a different repository but kept receiving an error:

{LF:Name="*",Type=F} & {LF:LOOKIN="Employee-Payroll\INACTIVE_Employees\",  Subfolders=Y} & {[Employee Folder]:[Last Name]="SMITH"}

After looking through other posts, I changed the first ampersand to a dash:

{LF:Name="*",Type=F} - {LF:LOOKIN="Employee-Payroll\INACTIVE_Employees\",  Subfolders=Y} & {[Employee Folder]:[Last Name]="SMITH"}

I was able to find employee folders, but they were not in the location specified in the Search. It returned employee folders from 'Employee-Payroll\ACTIVE_Employees':

When I changed the search to look for in 'Employee-Payroll\ACTIVE_Employees':

{LF:Name="*",Type=F} - {LF:LOOKIN="Employee-Payroll\ACTIVE_Employees\",  Subfolders=Y} & {[Employee Folder]:[Last Name]="SMITH"}

It returned employee folders from 'Employee-Payroll\ACTIVE_Employees':

0 0
replied on January 15

Correction

{LF:Name="*",Type=F} - {LF:LOOKIN="Employee-Payroll\ACTIVE_Employees\",  Subfolders=Y} & {[Employee Folder]:[Last Name]="SMITH"}

returned employee folders from 'Employee-Payroll\INACTIVE_Employees':

0 0
SELECTED ANSWER
replied on January 15

That's probably because you have a "-" instead of "&" after  {LF:Name="*",Type=F}

So the search changed to "all folders except the ones under Active Employees..."

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

Sign in to reply to this post.