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

Question

Question

Advanced Search Syntax supporting list of values like the SQL WHERE IN clause

asked on April 17, 2017

Does the LF Advanced Search Syntax support searching on a list of values, much like the SQL WHERE IN clause, and if so, what's the syntax?  I.e.:

In SQL: Select * from tblTable where colColumn in ("value1","value2","value3")

In LF Search: 

- Instead of {LF:ID=12345}

- {LF:ID in 12345, 23456, 34567}

 

I believe I've done this before, and even think I found a discussion on it under Answers, but can't find it now!

 

Answer

SELECTED ANSWER
replied on April 17, 2017

Hi Damon,

I believe you can accomplish the search 'LF:ID in 12345, 23456, 34567' using the following syntax:

({LF:ID = "12345"} | {LF:ID = "23456"} | {LF:ID = "34567"})

I tested this out in my Web Client using a couple of test documents and the following search syntax:

({LF:ID = "$(SearchTerm)"} & ({LF:ID = "6"} | {LF:ID = "7"}))

If $SearchTerm is either "6" or "7", the document with the relevant ID is returned; if it's any other value, nothing is returned.

Please let me know if this solution works for you!

Thank you,

Rob

Replies

replied on April 17, 2017

Yup, after getting Miruna's reply this morning, I switched to using the OR operator.   The double-quotes in your example aren't necessary as its the entry ID... presumably because it's stored as an integer and not characters.  

{LF:ID = 12345} | {LF:ID = 23456} | {LF:ID = 34567}

 

replied on April 17, 2017

That type of search is supported for field values.

You are not allowed to follow up in this post.