August 26, 200124 yr Newbies i was trying to do a script that searches for text strings that contain certain character. for example if i want to find if a field contains an email address how can i do the comparison: [if f3 "contains" @] how can i put this into a script... any help will be appreciated..
August 26, 200124 yr You need to use the "PatternCount" step. This is a great step for finding any text you want. You can anter the text - for example "@" to find emails so it would look something like this in a script: (or you could define a calculation field to filter anything you want) ----- If PatternCount(F3; "@")>0 End if ----- now you would have to decide what should happen if there is a "@" present. I use this trick for filtering emails, but also use PatternCount with ".com" ".de" and also domain names etc for sorting emails. Remember, you can also use a field name instead of text, so for example: PatternCount(F3;F4)>0 PatternCount is one of the most versitile steps. You should invest some time with this. It's explained in the FMP help file, but the basic format is: PatternCount (Where should it look;What it should look for)it then tels you how many times it found it Remember, your seperators are maybe different to mine ";" PS: the other cool thing about PatternCount is that it can find returns or empty spaces, too Hope this helps, Rigsby
Create an account or sign in to comment