December 7, 200916 yr Hi People, I want to remove any carriage returns from a field (using auto enter calc.). I've read the forums and tried Substitute ( my text; ¶; "") and Trim ( Substitute ( my text; [¶; ""]; [Char(9); ""] )) I also tried to Filter() it out but no luck. Any suggestions?
December 7, 200916 yr The calculation formula Substitute ( Fieldname ; "¶" ; "" ) does remove the cariage returns, after you commit the record. another option is to use script trigger 'OnObjectExit', instead of auto-enter calc.
December 7, 200916 yr Do you want to remove carriage returns from within the text itself, or just leading and training returns? If it's just leading and trailing returns, use the Trim4 custom function on Brian Dunnings web site.
December 7, 200916 yr I want to remove any carriage returns from a field (using auto enter calc.). Auto-enter calcs are triggered by input into the field (or into another field referenced by the calculation). Data already entered will not be modified, unless you do something.
December 7, 200916 yr find all records that you want to change. script::: go to first record start loop substitute as previously mentioned by others go to next record exit at last end loop this will cause the substitution that you want for all existing records.. future records should have the auto enter substitute calc Context is everything so make sure you run the script from an appropriate layout with the appropriate found set.. ps.. my comment was not directed at comment but at the originator.. sorry : ) Edited December 7, 200916 yr by Guest
December 7, 200916 yr ... or do it in a single step using the Replace command, and specify the Substitute calculation.
December 8, 200916 yr Author What I didn't explain well enough is that I wanted to remove any carriage returns entered by the user upon committing the record. I don't have any in my data now, I just don't want any put in during data entry. Using a Mac on a Windows network (in case that's significant) I entered data with returns and none of the methods mentioned (in my auto enter calc.) removed the returns when I committed the record. It's like the return is not being recognised at all since Filter function doesn't even remove them. Edited December 8, 200916 yr by Guest
December 8, 200916 yr Try the Trim4 Custom Function by Ray Cologon, I have used it and it is amazing. Link
Create an account or sign in to comment