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 Carriage Returns in DB

Featured Replies

  • Newbies

Hi all, obviously I'm very much a newbie at FM.

I run a newspaper website where the prvious database whas a simple flat file text file. I've successfully imported it into FM, but now have an issue I can't seem to solve.

Wherever there were html line breaks, I need to turn into normal carriage returns within the field; i.e., find "

" and replace with a carriage return. What is the proper way to do that? In BBEdit I would replace with "r", but FM seems to take that quite literally.

TIA

There is a "special" symbol for carriage returns - it loks like a "paragraph" symbol.

You should be able to replace all your "

" with "¶".

  • Author
  • Newbies

Hi Mark,

Well, pasting in the paragraph symbol also did it quite literally. Instead, I put a return elsewhere int he field, highlighted the return, then copy and pasted it into the replace field to get it to work.

Curious, where can I find a list of these special characters?

Thanks again!

There are no other "special" characters, but check out the calculation entry box for more clues.

I'm not totally sure I'm understanding what you are trying to do, but it sounds from this:

find "

" and replace with a carriage return

That all you would need to do is use a calculation and the Substitute function to get the results you are after.

There are two ways to approach this, either create a new field using the calculation shown below, or create at script that will loop through your records changing the data in your existing field.

The new field would be a calculation, text result

Substitute (YourTextField; "

"; "¶")

The Script would have a loop if you want to change more than the current field, and the Script Step of Set Field

SetField( YourTextField, Substitute (YourTextField; "

"; "¶")

HTH

Lee

  • Author
  • Newbies

Ah, I see. Thanks for the detailed description!

Todd

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.