November 2, 200916 yr I have user who entered SSN numbers inside a paragraph style text field. I need a way to find and remove the SSN numbers. I can find them all by doing a find on (###-##-####). But now how can i do a replace or delete on just that text within the paragraph?
November 3, 200916 yr FileMaker does not (yet) have the ability to do regular expression pattern-matching within calculations/scripts, only a limited capability within Finds. If you are willing to use AppleScript you can use Unix commands, which have this ability; though it can sometimes be awkward to tiptoe between them, as each has their own character escaping. There are also plug-ins which can do this, such as the free ScriptMaster. But if I can, I stick to AppleScript, run via the FileMaker Perform AppleScript step. In the example file there is both a single record script, and a Loop for a found set. The example is setting the result into a 2nd field, to make it easier to test. But in real life you'd direct the last call (line) back to the original field. I am showing the calculation on the layout, so you can see what it looks like. You could just put it into the Perform AppleScript itself (which supports either using a calculation field, or doing the calculation there). Sed_SS_.fp7.zip
November 3, 200916 yr Author amazing!!! never thought to go at it this way. I will try to implement this into my app and let you know how it goes. Many Thanks, Tony
November 3, 200916 yr Author So I imported the calculation and the scripts and modified to point to my fields but it seems to not function as you demo does. Am I missing a step to invoke applescript?
Create an account or sign in to comment