Forum Discussion
If I had to do it, I would:
1- use JQuery to get what the user is entering in the box
2- build the LiQL query, using the WHERE close, and adding the string you've capture in 1
3- use an AJAX call so the page doesn't reload ; and displays results as soon as it arrives
Sorry for not providing the exact code.
- micha8010 years agoExpert
Hi OlivierS,
thanks for your answer. Could you please tell me what where condition I should use to check if the first char of a message subject is an "A"? I havn't found anything. In SQL I have something like the "Like" syntax but there is nothing like this in LiQL. Am I correct?
Regards,
Michael
- OlivierS10 years agoLithium Alumni (Retired)
Sorry. you're correct. It looks like the WHERE clause doesn't have a 'like' keyword (maybe for performance optimization).
You could use 'IN' or 'MATCHES' keywords, but with only one letter, it might return too much. Although, it won't only return messages starting with 'A' (or the letter you specify) but all messages containing that letter ... So you will have to apply some RegEx once the message is returned ... Try that on stage first to evaluate performance impact.
Or wait for other people to respond as my knowledge on API / LiQL / JS is limited!
Related Content
- 2 years ago
- 2 years ago
- 2 years ago
- 2 years ago
- 2 years ago