Hello there! put your field to auto-enter a calculation with Trim(Self) and uncheck that Do not replace exist value
Guh, I've done this before. Thanks for the re enlightenment and allowing me to move on.
It's always the right under my nose!
Alright I feel like a dope. This seems very easy and I can not get this to work. I have a code as a text field the entry is
ABC 110 10 08. I have done as suggested 1. Auto enter calc 2. TrimAll ( Self; 1 ; 2 ) 3. uncheck the box for existing value
and I thought I would see ABC1101008 but nothing has changed? I tried typing in a new code and still the same what am I missing? I read on another post when a user adds a space by accident it will be taken away as well.
Thanks for clarification.
The example provided by Stella Luna was to remove only leading and trailing spaces.
To remove ALL spaces, use:
TrimAll ( Self ; 0 ; 3 )
The first parameter might be confusing. It should be set to 0 and only might be set to 1 if you are using non-Roman. Most of us use Roman; see FM Help on TrimAll() for specific examples.
The second paramter (3) says to remove ALL spaces everywhere which seems like what you want. :^)
Thank you for the clarification. works perfectly I can utilize this in many situations.
2 of 2 people found this helpful
trim( textFormatRemove( self ))
I tried this, and it works spendidly...
input = TextField ;
noReturns = Substitute ( input; "¶" ; " " ) ;
trimmed = Trim ( noReturns ) ;
noFormat = TextFormatRemove ( trimmed )
There are also custom functions that you can use that filter out undesirable characters etc.
The term you're looking for is 'nest', rather than 'stack'.
Bruce's is the one I have on most of my fields. Been considering adding a Substitute for paragraph returns too. Copy/pasting from e-mails often brings in extra line breaks at the end of the value.
Look for Ray Cologon's Trim4() custom function.