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

Question

Question

Workflow Search Repository - Query Syntax

asked on October 24, 2019

I have a Search Repository activity in a workflow with the following query. When I test the search query, it pops up the 'Define Token Value' window and when I provide the search term, it returns the result.

{LF:Basic ~= %(EntryToSearchToken) , option="NLT"} & {LF:Name="*", Type="D"} & ({LF:LOOKIN="\TestFolder", SUBFOLDERS=0}) 

But when I run the workflow, it throws an error, "A syntax error was encountered while processing the search or query statement."

Could not figure out the syntax issue.

0 0

Answer

SELECTED ANSWER
replied on October 24, 2019

Yea, tokens are a bit of a special circumstance. Within Workflow, it will typically recognize the %(Token) format regardless of quotes unless the % is escaped.

0 0

Replies

replied on October 24, 2019

What is the value of the %(EntryToSearchToken) when you run this workflow?

0 0
replied on October 24, 2019

"Test#12345". This value works when I do the Test Search Query

0 0
replied on October 24, 2019

I'm not seeing the error. You can try tracking your token to confirm the value. Or you can try looking at Audit Trail data to see what the search looked like when it hit the Laserfiche Server.

 

0 0
replied on October 24, 2019

Figured out the issue.  If there is a space in the Entry Name, Workflow will throw a syntax error. e.g. Test #12345. This will work when you define the token value while doing the Test Search Query, I am putting it in double quotes at that step.

How do I update my query to consider spaces? I cannot put the Token in double quotes.

0 0
replied on October 24, 2019

Why can't you use double quotes?

0 0
replied on October 24, 2019

That's right! It works with double quotes, I had not tested that. I thought if you put double quotes, what ever inside it, will be considered as such the search term and not the token to search.

{LF:Basic ~= "%(EntryToSearchToken)" , option="NLT"} & {LF:Name="*", Type="D"} & ({LF:LOOKIN="\TestFolder", SUBFOLDERS=0}) 

 

Thank You!

0 0
SELECTED ANSWER
replied on October 24, 2019

Yea, tokens are a bit of a special circumstance. Within Workflow, it will typically recognize the %(Token) format regardless of quotes unless the % is escaped.

0 0
replied on February 20, 2020

What does option="NLT" mean?

1 0
replied on February 20, 2020

I do not remember exactly what the NLT option was for. If you select the option to search for Name alone, then it just shows N. Will post when I find that out

0 0
replied on March 9, 2020

It's puzzling, how I came up with that 'NLT 'option. I would have selected some options and the resulting query syntax would have had it. I saw a post for 'LTN'  as ' (Name search with Leading and Trailing wildcards)' at https://answers.laserfiche.com/questions/90736/search-syntax-for-name-does-not-contain

So if anybody has any idea about 'NLT', please share.

 

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

Sign in to reply to this post.