September 8, 201213 yr 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
September 8, 201213 yr 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
September 8, 201213 yr 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!
November 5, 201213 yr I setup a script, Evaluate(Quote(yourFieldNameHere)) and set an onObjectValidate trigger. just something else to try....
November 5, 201213 yr 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