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 5523 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi People,

I want to remove any carriage returns from a field (using auto enter calc.).

I've read the forums and tried

Substitute ( my text; ¶; "")

and

Trim ( Substitute ( my text; [¶; ""]; [Char(9); ""] ))

I also tried to Filter() it out

but no luck.

Any suggestions?

Posted

The calculation formula

Substitute ( Fieldname ; "¶" ; "" )

does remove the cariage returns, after you commit the record.

another option is to use script trigger 'OnObjectExit', instead of auto-enter calc.

Posted

Do you want to remove carriage returns from within the text itself, or just leading and training returns?

If it's just leading and trailing returns, use the Trim4 custom function on Brian Dunnings web site.

Posted

I tried a few times using auto-enter calc. but they were still there.

Posted

I want to remove any carriage returns from a field (using auto enter calc.).

Auto-enter calcs are triggered by input into the field (or into another field referenced by the calculation).

Data already entered will not be modified, unless you do something.

Posted (edited)

find all records that you want to change.

script:::

go to first record

start loop

substitute as previously mentioned by others

go to next record exit at last

end loop

this will cause the substitution that you want for all existing records.. future records should have the auto enter substitute calc

Context is everything so make sure you run the script from an appropriate layout with the appropriate found set..

ps.. my comment was not directed at comment but at the originator.. sorry : )

Edited by Guest
Posted

... or do it in a single step using the Replace command, and specify the Substitute calculation.

Posted (edited)

What I didn't explain well enough is that I wanted to remove any carriage returns entered by the user upon committing the record.

I don't have any in my data now, I just don't want any put in during data entry.

Using a Mac on a Windows network (in case that's significant) I entered data with returns and none of the methods mentioned (in my auto enter calc.) removed the returns when I committed the record. It's like the return is not being recognised at all since Filter function doesn't even remove them.

Edited by Guest

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