January 4, 200818 yr If Anyone can help, I'd greatly appreciate it. I want to make a field calculation. And I want the calculation to look at another field in the same record and take 2 letters out of the name and add numbers to it example: "name" field = Adventure Sport I want the "number" field to read "AS001". I can't find the function to actively select the first letter of each word. Can you help me? Thanks.
January 4, 200818 yr Hi what if the field contains only a word ? and if contains more than two ? BTW: this calculation... Filter ( Proper ( Lower ( text ) ) ; "ABCDEFGHIJKLMNOPQRSTUVXYWZ" ) ... will give you the first letter of each word. Than you have to keep the first two with: Left ( Filter ( Proper ( Lower ( text ) ) ; "ABCDEFGHIJKLMNOPQRSTUVXYWZ" ) ; 2 ) ... but what you wish if the word is only one ? If you think to use a fixed char ( like "X" ) than the calculation becomes: Left ( Filter ( Proper ( Lower ( testo ) & " X" ) ; "ABCDEFGHIJKLMNOPQRSTUVXYWZ" ) ; 2 )
January 5, 200818 yr It's a GENERAL method for getting the initials. If you have input that's guaranteed to be in title case, you don't need it. It also might need other adjustments if you're dealing with special cases like names (d'Arcy, Smith-Jones, etc.). But it's a great way to avoid a recursive calc.
January 5, 200818 yr Could someone explain to me the need for the Lower()? Take a omnipresent name here, like LaRetta : , will the R come thru as well, same would McCain give two which would allow both M and C thru. So by lowering every char first and then Proper( afterwards will only the leading char in each word be capitlaized. --sd
January 5, 200818 yr I would think that Proper(text) would always be the same as Proper(Lower(text)). Is there an example where that isn't true? In my FM9A Data Viewer, Proper("LaRetta") returns Laretta. Proper("McCain") returns Mccain.
January 5, 200818 yr Ah. One of those things that are obvious - AFTER someone points them out. Thanks for that.
January 5, 200818 yr Could someone explain to me the need for the Lower()? good point ! No need for Lower, but some needs for other accented chars into the string
Create an account or sign in to comment