Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Is there a way to create a trim function that will trim ALL non-printing characters? The built-in Trim function only takes care of leading/trailing spaces.

Barring that, maybe I can set an "In range" limit on the field? But how would I do that if I wanted to include everything except non-printing characters? There are a number of odder characters (punctuation, foreign chars, etc.) I'd like to keep.

Posted

In v6, you can use nested Substitute() functions to replace any characters you want with nothing. In v7, you can enter a list of substitutions instead of using nested functions.

  • 2 weeks later...
Posted

Well, the substitute function only substitutes each unique, non-overlapping instance of the substituted-for string. Let me use "a" instead of "par.gif" just to keep it clear (if only in my own mind wink.gif ):o

Start with "aaa". Find every occurrence of "aa" -- there's only one, right?

aaa or aaa.

Now delete every occurrence of "aa" and replace it with something, anything, oh, i don't know, let's say "a", and we wind up with

aa

You can get around this feature/limitation (depending on your perspective) by iterating the substitution multiple times:


Loop

..Substitute ( theField , ":paragraph::paragraph:" , ":paragraph:" )

..Exit Loop If ( PatternCount ( theField , ":paragraph::paragraph:" ) = 0 )

End Loop

HTH,

Jerry

Posted

The algorithm can be translated to work in older versions (Bob Weaver's example that you sited used the original substitute() syntax. His was for eliminating spaces, but the same thing can be done for line returns.)

Posted

Hi Ender,

Sorry, I guess I didn't make myself very clear. My question about v7, was regards to the Filter part of the calculation. Is that a version 7 feature, or did I miss something?

Lee confused.gif

This topic is 7352 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.