Skip 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.

Carriage Returns in a field.T

Featured Replies

I have a text block field which contains lines of text separated by carriage returns and I was wondering if it was possible to remove all carriage returns that do not contain any text on a line.

CR.jpg

Thank You for any thoughts on the matter.

If your field is called OriginalText, then this calc might do what you need. It works in v10. I'm not sure when TrimAll() introduced.

Substitute(

Substitute(

TrimAll(

Substitute(

Substitute(OriginalText; " "; "__SPACE__");

"¶"; " ");

0; 0); " "; "¶"); "__SPACE__"; " ")

If you know that the number of blank lines is relatively small, you can use the simpler

Substitute(OriginalText;

["¶¶¶¶¶¶¶";"¶"];

["¶¶¶¶¶¶";"¶"];

["¶¶¶¶¶";"¶"];

["¶¶¶¶";"¶"];

["¶¶¶";"¶"];

["¶¶";"¶"]

)

  • Author

Neither one seem to work for me.

The calculated field showed the same result as the original text field.

Thank you. I'll keep at it.

Check into the possibility that the problem in the field isn't that there are blank lines from the user hitting the Return key, but the blank lines are due to the user hitting the SPACE bar so that the next visible text starts on a new line in the box.

Last year I had to clean up a customer's database where that was the case. Instead of putting multiple phone numbers on separate lines with Return, the user hit the space bar multiple times after the first phone number before entering the second.

Now the method suggested should at least give a change in the result, and there is a more clever algorithm for this purpose.

But perhaps you should attack the matter differently, since these does usually originate from a scripts deeds, and my prefered way to avoid it is for setting as well as the riddance of an element in such a list is to exploit this CF:

http://www.briandunning.com/cf/39

The function simply toggles on and off for each value...

--sd

Neither one seem to work for me.

The calculated field showed the same result as the original text field.

Thank you. I'll keep at it.

That's impossible.

At this point it would be helpful if you upload a file so we can see how you're doing this.

  • Author

Definitely the return key I tested it in my sample file. Would platform have a factor? mac vs pc?

No, platform is not a factor. Entering the calculation correctly does make a difference.

The substitutions should have a simple pilcrow or a series of pilcrows and no special character preceding the pilcrow. Methinks your browser and/or your copy-paste functionality has thrown a monkey wrench into the works.

  • Author

Boy do I feel dumb :-(

Correct calcs make all the difference.

Both worked just fine.

Thanks a million!!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.