Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How to Strip out Social Security Numbers from within text


This topic is 5498 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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

Posted

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?

This topic is 5498 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.