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.

Removing extra Carriage returns

Featured Replies

I am trying to use the find/replace feature to eliminate user entry errors when they hit the "enter" button twice while typing in a list. I can't seem to find a way to make it find the carriage returns. - Would I have to do all of this in a calc field.

Capture two returns from a text file or field.

Lee

  • Author

Thank you for the quick response. I tried what you said, but it only seems to partially work. It will find the double carriage return. But, it will not replace it with a single or for that matter any other number of carriage returns. It also won't find two carriage returns if it is at the end of the field (which is the most likely place a user will put it.)

How about a custom function? There's Ray Cologon's Trim4 function. You can find it on Brian Dunning's site. http://www.briandunning.com/cf/166

  • Author

I just have Pro and not Advanced, so I can't use the Custom function feature. I am still working on the leading and trailing carriage returns, but this eliminates all of the "middle" carriage returns.

Loop

If [“PatternCount(field, “¶¶”)>0

Set Field [“field”, “Replace(field, Position(FirstName, “¶¶”,1,1),2,” ¶”]

End If

Exit Loof If[“PatternCount(field, “¶¶”)=0”]

End Loop

  • Author

Placed after the loop in the previous post, this will take out leading and trailing carriage returns.

If [Left(field,1)=” ¶”]

Set Field[“field”, “Right( field, Length(field)-1 )”

End If

If [Right(field,1)=” ¶”]

Set Field[“field”, “Left(field, Position( field, "¶" ,1, PatternCount(field, "¶" ))-1)”]

End If

Here's an old formula, for converting multiple paragraph returns to one. I believe it will do up to 21 consecutive. To do more, add a line with 21 (at top). I think it was Bob Weaver who not only came up with this, but who explained why it works. We no longer need it with 7/8, as we can use a Custom Function.

Substitute(Substitute(

Substitute(Substitute(InputText,

”¶¶¶¶¶¶”,”¶”),

”¶¶¶”,”¶”),

”¶¶”,”¶”),

”¶¶”,”¶”)

I was actually going to post a question re spaces but the answer may be here

I cut and paste from emails into fields sometimes the input string has spaces at the begining or end that i dont want recorded

is this the same thing that you are talking about here?

Use the Trim Function to remove the leading and trailing spaces.

Also, check this post if you need to remove more spaces within the text by Bob Weaver Link

HTH

Lee

Ok Ithink im getting there

have got it removeing spaces but not returns

Left(test2, 8)

If [Left(test2,1)=" ¶"]

Set Field["test2", "Right( test2, Length(test2)-1 )"

End If

If [Right(test2,1)=" ¶"]

Set Field["test2", "Left(test2, Position( test2, "¶" ,1, PatternCount(field, "¶" ))-1)"]

End If

Can you spot the mistake?

Similar to this how do you remove or replace Caridge returns in excel. see example below..

dfgdfgdfgdfgdfgdfgdfgdf

I can use the =(SUBSTITUTE((Insert Cell here),CHAR(?),CHAR(10)))

but I do not know what ascii character filemaker exports it charidge return as?

Please advise

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.