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.

Trouble with formulating a CF's syntax

Featured Replies

Howdy, all:

I need a little help formulating the syntax for a proposed CF--named StripAllFormatting__cf--I'm cobbling together; what it does is strip away all kinds of excess stuff (returns, spaces, tabs, etc.) so it makes the data in a field "clean".

The Players

Trim command

TextFormatRemove command

CleanText__cf (contains a Let function-driven, Substitute-related command structure ) http://www.briandunning.com/cf/638

TrimReturns__cf (removes excess carriage returns) http://www.briandunning.com/cf/80

The goal is to include in many text fields in my solution an auto-enter calculation, StripAllFormatting__cf (Self)

TIA for your help!

Rich

What sort of help do you need?

In a database where users copy/paste data into the system, I found there were lots of strange whitespace characters. If you are building a function like this, you might want to account for them: http://en.wikipedia.org/wiki/Whitespace_character

  • Author

What sort of help do you need?

Thanks for the heads-up, Dan--I'll code those in later once I get the CF to work.

After dinking around some more, I think I got the hang of what I'm after:

TextSize ( TextFormatRemove ( Trim ( CleanText__cf ( TrimReturns__cf ( Text ) ) ) ); 12 )

It's ugly, but it works!

  • 1 month later...

I setup a script,

Evaluate(Quote(yourFieldNameHere))

and set an onObjectValidate trigger.

just something else to try....

Get the Trim4() cf from Brian Dunnings web site (the cf is by Ray Cologon).

In each text field, set an auto-enter calculation:

Trim4( TextFormatRemove( self ) )

Allow the auto-enter to overwrite the existing contents.

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.