Solved

Find vs. Text Function search wildcard

Posted on 2011-10-22
439 Views
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
0
Question by:MarkJulie

LVL 6

Expert Comment

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

Author Comment

I checked. It is text, so back to debugging for another solution.
0

LVL 6

Accepted Solution

Mark
Sorry a find works using that format "593@@"....
another option (if you change it to a number field or create a identical field that is a number
then ...
If(zipField=> 59300  and  < 59400')
Set Field (newPostal=zipField)
End If

0

LVL 24

Assisted Solution

Mark,

Why not just use this:

If[ left( zipField ; 3 ) = "593" and length( zipField ) = 5 ]
Set Field (newPostal=zipField)
End If
0

LVL 6

Expert Comment

Willmcn
i think left and length are the better answer...
0

Author Closing Comment

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.)
0

LVL 24

Expert Comment

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.
0

Write Comment

Please enter a first name

Please enter a last name

We will never share this with anyone.

Featured Post

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!