Gravatar for

Question by sdimillo, Feb 2, 2017 5:45 PM

using a Notify Trigger to display a message based on the query length

Can the Notify Trigger be set up so that it is triggered by the structure of a message? What I'm thinking of is something that can check if a query is a single word or term and if so, display a message on the screen saying "Search Tip: multi-word searches describing your problem or symptom may get better results".

1 Reply
Gravatar for

Answer by François Lachance-Guillemette, Feb 3, 2017 1:42 PM

You could add a condition with a simple Regex to match one word in the query.

For instance ^[A-Za-z0-9_]+$ matches a word with underscores and numbers.

I tried it out and it looks like it is working well :)

Ask a question