June 3, 200223 yr When I import data to my FM database, the text is all UPPER CASE. I would like the text to be Title Cased. Example: (FRED FLINSTONE) ---should be--- (Fred Flinstone) I have created a calc field, to begin with, using the following suggested script. Upper(Left(UpperCaseText, 1) & Lower(Middle(UpperCaseText, 2, 100) I must confess, I do not understand scripts very well at all and the above looks Greek to me. I did try it, but it returns the text in UPPER CASE yet. Can someone please suggest how to modify the above script so it returns the text in Title Case? Thanks in advance.
June 3, 200223 yr You will want to use the Proper function. If you do not have any hyphenated names then the following will work Proper(UpperCaseText) If you have hyphenated names, then you will need the following Proper(Left(UpperCaseText,Position(UpperCaseText,"-",1,1)))&Proper(Right(UpperCaseText,Length(UpperCaseText)-Position(UpperCaseText,"-",1,1))) Hope this helps
June 3, 200223 yr Use the Proper calculation function. So your calc will be: Fixed_Up_Text = Proper(UpperCase_Text) This will turn FRED FLINSTONE into Fred Flinstone, but it will also turn Karen deBoer into Karen Deboer. If you want to get fancy, you will need a few If or Case statements in your calculation to deal with these. Also, if you're importing data like this, you might want to consider parsing the names into separate firstname and lastname fields. This will make life easier for you for sorting later on. I can send you a parsing file which handles this, including hyphenated first and last names. You can expand this if you want to also have separate fields for first and middle names. If you want this, send me a PM.
June 3, 200223 yr Hello Kip, Some recommendations: Use separate <firstNAME> & <lastNAME> fields - this makes sorting, finding, ETC. work much better in your solutions Create IMPORT fields and LAYOUT fields - IMPORT fields are for the 'raw' data - LAYOUT fields are what you use to edit, display, sort, ETC. Create LAYOUT fields as 'text' fields with 'calculated results' option - formula "LAYOUTlastNAME = Proper(IMPORTlastNAME)" - using the 'calculated results' option of the 'text' field will allow users to modify the contents after importing - whereas 'calculation' fields don't allow modifications - this also allows for 'tweeking' of those peculiar names like Jane Smith-jones IDEA: Utilize a separate 'import' file to bring your 'raw' data into. Utilizing a separate 'import' file means you don't need extra 'IMPORT' fields in your solution... making your solution more effecient. You can then do things like 'trimming' spaces & returns; separating first & last names; separating city, state, & zips; setting 'proper' case; 'reserializing' serial numbers; ETC. ETC. ETC. I prefer to perform the 'Replace' command with the 'calculated results' option with formulas. Once you have used this file to 'clean' all your data, you can than start 'importing' this 'clean' data into your solution. Good Luck! Bob Kundinger
Create an account or sign in to comment