Steven Cappiello Posted December 17, 2005 Posted December 17, 2005 I have a calculation field: lastname_comma_firstname my problem is that names that have apostrophes are showing like this: John O'shea when it should be John O'Shea can anyone help me to write a calculation that will prevent this from happening ? the letter following the apostrophe will never be a lower case letter.. as far as I can foretell
RalphL Posted December 17, 2005 Posted December 17, 2005 Make a calculated text field cLastName = If ( PatternCount ( LastName ; "'" ) ; Replace ( LastName ; Position ( LastName ; "'" ; 1 ; 1 ) + 1 ; 1 ; Proper ( Middle ( LastName ; Position ( LastName ; "'" ; 1 ; 1 ) + 1 ; 1 ))) ; LastName ) If you have your database set to use smart qoutes you must use a single smart quote in the 3 places where a single quote is used.
Lee Smith Posted December 17, 2005 Posted December 17, 2005 There may be a new way to do this in v7/8, but you will have a hard time beating the way Lynne Bradford handles the names in the older file I POSTED here click here
Recommended Posts
This topic is 6981 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