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

Question

Question

Search Query for Excluding One Template

asked on July 26, 2018

I'm trying to configure a search query to search for everything that does not contain a certain template. I assumed that the query would be, for example, in searching for any document starting with Word that does not have the Client template:

 

{LF:Name="Word*"}-{LF:TemplateName="Client"}

 

When I run that search, it also excludes everything that does not have a template at all.

I tried adding logic to explicitly include things with no template, but it did not change anything.

0 0

Answer

SELECTED ANSWER
replied on July 26, 2018 Show version history

Try this instead. Not as compact, but it will include documents with no template.

({LF:TemplateID=0} & {LF:Name="*", Type="D"}) | ({LF:Name="*", Type="D"} - {[Client]})
3 0

Replies

replied on July 26, 2018

Try this instead

{LF:Name="Word*"} - {[Client]}

 

0 0
replied on July 26, 2018

That also ignores everything with no template.

0 0
SELECTED ANSWER
replied on July 26, 2018 Show version history

Try this instead. Not as compact, but it will include documents with no template.

({LF:TemplateID=0} & {LF:Name="*", Type="D"}) | ({LF:Name="*", Type="D"} - {[Client]})
3 0
replied on July 26, 2018 Show version history

That's what I was going to suggest, add the TemplateID=0.

0 0
replied on July 27, 2018

Thank you, Jason. Now that the query works I'm trying to use it in a Quick Search, but it seems impossible. Quick Search turns the 

({LF:TemplateID=0} & {LF:Name="*", Type="D"}) | ({LF:Name="*", Type="D"} - {[Records Scan]})

search into

{LF:Basic~="*",option="LTN"}|({LF:TemplateID=0} & {LF:Name="*", Type="D"}) | ({LF:Name="*", Type="D"} - {[Records Scan]})

so because of that first part (Basic | ) it includes items with the template anyway

Is there no way to avoid that with Quick Search?

You are not allowed to follow up in this post.

Sign in to reply to this post.