Link to home
Start Free TrialLog in
Avatar of MarkJulie
MarkJulieFlag for United States of America

asked on

Find vs. Text Function search wildcard

I can use "@' to search for one wildcard character in Find. However, I want a script trigger that uses Text Function to evaluate a five-digit ZIP (formatted as text) for boolean=true for anything matching '593@@'. I.e., if the field has five alphanumeric characters, the first three of which are '593' with the final two being non-null. What does not work is:

 If(zipField='593@@')
Set Field (newPostal=zipField)
End If

What is the correct syntax? I prefer not to use the left three characters as a match since I also need five characters in the field.

Mark
Avatar of ThomDroz
ThomDroz

Is the field type a number?
Change it to text and try it, it worked for me with @
Avatar of MarkJulie

ASKER

I checked. It is text, so back to debugging for another solution.
ASKER CERTIFIED SOLUTION
Avatar of ThomDroz
ThomDroz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Will Loving
Will Loving
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Willmcn
i think left and length are the better answer...
Both answers have been helpful. In the end, since this is not actually a ZIP field but 6-digits of text sometimes filled with 1-2  trailing spaces (but always xxx.xx formatted with a decimal, I used GetAsNumber (Left,3 (zipField)) to evaluate the range and a Not Equals on one specific value in the middle of the range. Superb work for not enough points. (I thought it was a no-brainer.)
Just an FYI. FM treats certain characters as word breaks, so if the number of characters varies, you could just use If [ Leftwords( zipField ; 1 ) = "593" ] it would get everything before the period.