Rich S Posted September 8, 2012 Posted September 8, 2012 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
dansmith65 Posted September 8, 2012 Posted September 8, 2012 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
Rich S Posted September 8, 2012 Author Posted September 8, 2012 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!
charles huff Posted November 5, 2012 Posted November 5, 2012 I setup a script, Evaluate(Quote(yourFieldNameHere)) and set an onObjectValidate trigger. just something else to try.... 1
Vaughan Posted November 5, 2012 Posted November 5, 2012 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.
Recommended Posts
This topic is 4736 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now