Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

replacing text with carriage returns

Featured Replies

  • Newbies

I imported an ascii file into Filemaker 7. One field is a long text field that has carriage returns. After the import into Filemaker the carriage returns were replaced with the text /n/n. I want to bring the carriage returns back. I tried the find/replace function but I can't seem to put a carriage return symbol into the replace box in the dialog window.

Can this be done? Thanks, Tom

Hi there Tom

You would use the substitute function to achieve this.

Substitute ( TextField ; "n/n/"; "¶")

The ¶ symbol is a carriage return in FileMaker.

You could use this in a set field script step or Auto Enter Calculation in the text field.

I hope this helps.

Straggler

Edited by Guest

"I tried the find/replace function "

Don't use that but, after selecting that field, go to:

Records-->Replace field contents...-->Replace with calculated result-->specify:

(here your calc)

BTW: be sure to make this on a copy of your DB.

Just to clarify a small point since Tom is a beginner. You showed him the following formula:

Substitute(TextField; "n/n/"; "¶")

He said his text contained "/n/n". So, the formula should be:

Substitute(TextField; "/n/n"; "¶")

In addition, if you use this formula in a script as you suggested, a table name is required:

Substitute(MYTABLE::TextField; "/n/n"; "¶")

I also agree with Daniele to use Replace Field Contents since it will work on all his records in the found set. It's better not to throw out a scripted solution to a beginner that only works on one record at a time. Also, the auto-enter calculation won't work on his existing data. Just some thoughts on who your audience is and to make sure you are clear.

  • Author
  • Newbies

Thanks to everyone for responding to my question. Daniele's suggestion worked like a charm. It is much appreciated.

Tom Brown

Thanks John for your points, I am relatively new to posting on the forum and just did not consider things like that.

The Straggler

  • Author
  • Newbies

In my initial euphoria over Daniele's solution I didn't notice something. After I run the substitute and replace the characters with paragraph returns I lose the last four characters of the field contents. So if an entry ends with "more." the field just ends with "m". So I lose the "ore." at the end of the field. This happens if the field entry goes over a certain length; shorter lengths don't seem to have the problem.

Btw the subsitution is for "nn" not the "/n/n" I orignally posted. These are being replaced by two carriage returns. Sorry about that.

Tom

Thanks.

BTW: be sure to make this on a copy of your DB.

It is for this type of errors that I said that !

BTW: what is your calc ?

  • Author
  • Newbies

Daniele:

My calculation was Substitute(tablename::field name;"nn";"¶¶")

I ran this on a copy of my database, as you suggested my master data is ok.

Thanks for thinking about this and good luck in tomorrow's game.

Tom

  • Author
  • Newbies

I just realized my error. I was using the calculation that would have appeared in a script. I just tried this calculation and it worked 100%: Substitute(fieldname;"nn";"¶¶").

Sorry to bother anyone with my carelessness.

Tom

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.