Karen1958 Posted June 23, 2010 Posted June 23, 2010 Can someone please tell me how to write a script that will search a text field for spaces and replace them with dashes?
Raybaudi Posted June 23, 2010 Posted June 23, 2010 If you really needs a script: Set Field [ YourTable::YourField ; Substitute ( YourTable::YourField ; " " ; "-" ) ] but that can be made using a calculation field or the option of auto-enter a calc for that field.
LaRetta Posted June 23, 2010 Posted June 23, 2010 Place cursor in field (back up file first) and select Replace Field Contents and specify by calculation. Calculation would be: Substitute ( yourField ; " " ; "-" ) If on-going, it can be scripted but I might suggest that you instead use auto-enter (by calculation) and uncheck 'do not replace existing value.' This would run every time the User leaves the field.
Karen1958 Posted June 23, 2010 Author Posted June 23, 2010 Thank you both so much! Was not aware of the substitute function.
Recommended Posts
This topic is 5267 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