Hello
I like to confirm one thing ,Is it possible to use "_" underbar in the filter of "like" search.Basically we use "%".
If somebody knows the explanation of document relating to my question on Outsystems web, please let me know.
Thank you in ahead.
EiMon
Hi EiMon,
I am not sure I understand your question properly. In your example, are you asking if it would work if the Session.Schools_SearchKeyword had the value of "_" . ? Or are you asking something else? Have you tried it? If so, what have you tried and what were the results.
Thanks
Stacey
Stacey Levine wrote:
Hi Stacey Levine
Thank you for answering my question and sorry my question was not quite clear. I did not know all WildCard<%,_> Characters related to the DB. I tested all the characters and it works well.
Thank you so much.
Hi Eimon,
You can use "_" with the Like. However, in this context, what is your main goal?
In that situation, if you want to search something named "Car", in order for the filter to work you need to provide "ar" in Var10.
Best Regards,
João Delgado
João Delgado wrote:
Hi João Delgado
Thank you for usage of "_" and usage of it. My question was quite unclear, sorry for that.
I did not know all WildCard<%,_> Characters related to the DB.I tested all the characters and it works well.
Hello Eimon,
Do you mean if in case your search string also contains either "%" or "_" character?
Have you tried enclosing them to [], i.e. "[%]", "[_]"?
Hope this helps!
- Emman
Emman Si wrote:
Hi Emman,
sorry for the late reply.It helps. i didn`t know [] can use. I wonder how about for the integer/decimal or currency ?
% and - are only for the string .
I wonder how about for the integer/decimal or currency ?
I think you can just feed this as you normally do, i.e. table.price = value.
Can you clarify your concern further?
Hi oh yes . i did it as you mention. "=" makes to get the same result .
i was wondering the result for the matching per one digit.
eg: i wanna search the 5678$ ,
while i enter the 56, it will show 5678 ...5688 ...5691....etc. Like the string , is that possible to do that in the currency ?
PS, i checked your profile and it's amazing though you are the newbie.
i got motivation from you .
I am happy to serve as motivation for you. :)
As for your concern, like keyword is only usable for string.
I think the closest you can do for that is by using >= instead, you can add a multiplier (to determine the place value) to the input on the request to simulate the like functionality:
price >= value * multiplier
price >= 56 * 100
price >= 5600 -> will output values like 5688, 5671, 5677, etc.
Although it will still output values like 5777, so maybe another filter is needed:
price < (value * multiplier) + boundary
price < (56 * 100) + 10price < 5610
This would require you to fetch the maximum value from your records though in order for you to determine the place value multiplier and boundary.