Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What it the result of below statement?
wildmatch(Country,'IN*') >0
wildmatch(Country,'IN*') will return 1 if the Country starts with 'IN', this might be a condition to show or hide a value based on the country name again if it starts with IN
wildmatch(Country,'IN*') >0 -- Similar to Country LIke 'IN%' in Sql
Simple: WildMatch() allows for Wildcards
- * for any number of digits
- ? for exactly one digit
That thing i know but why we use >0 here plz tell me
Hi rakesh, match and wildmatch returns an integer telling the first expression to search that was found, and 0 (zero) in case none was found.
=WildMatch('ABCD', 'AB*', '*CD') --> Returns 1 (the 1st "search expression" was found)
=WildMatch('ABCD', '*AB', '*CD') --> Returns 2 (the 2nd "search expression" was found)
So asking for >0 is telling that one of the search strings was found.
Hi,
in case you are using this expression as a condition like
If(wildmatch(Country,'IN*') >0, returnvalue1, returnvalue2)
then you can skip the >0 part:
If(wildmatch(Country,'IN*'), returnvalue1, returnvalue2)
will work the same way, because this comparison also returns a non-zero value (true = -1) in case country matches 'IN*'.
hope this helps
regards
Marco