June 15, 200520 yr Hello All New to Filemaker so please help. I want to type some text say "the little boy" and I want to know how to allow the text to automatically capitalize the first character e.g "The little boy" Thanks for your help in advance.
June 15, 200520 yr Ralph's solution will return only the first word. I would use something like Upper(Left( text; 1 )) & Right( text; Length(text) - 1 ) as an auto-enter calc with 'do not replace existing value' deselected.
June 22, 200520 yr Author Thanks for that but sorry for sounding stupid but where do I put this "Upper(Left( text; 1 )) & Right( text; Length(text) - 1 )" Thanks in advance. Martin
June 23, 200520 yr In the field definition, make it an auto-enter calculation and deselect 'do not replace existing values'.
January 25, 200620 yr Author I have done that in the box called company.See below:- [color:red]Upper(Left( Company; 1 )) & Right( Company; Length(Company) - 1 ) It returns only the "L" as capitalised:-[color:red]Lakeside audi. Any idea what I am doing wrong as I need [color:red]Lakeside [color:red]Audi? Thanks Martin
January 25, 200620 yr Why not use Auto Enter Calculation Proper (Text) And deselect the "do not replace existing values (if any) Lee
June 27, 200718 yr Ok this thread is really old but I figured it would be better then making a new topic. I have a similar problem with my data entry people never bothering to capitalize. Two questions: 1) I did a replace field contents with a calculated result using the Proper(Text) thing. Worked great but now how do I make it do that every time someone types something in? 2) Why wouldn't just changing the Text format for that field to "Title Case" work? Seems like it would fix the current problem and stop it from happening in the future. Thanks!
June 27, 200718 yr Ok well I just figured out the answer to my second question. It is not a good way to do it because it just changes the look of the text .... not the actual data. When I export they are still uncapitalized yet when I do it with the calculation method it actually changes it. : Ok so now it's just question 1 Thanks!
June 27, 200718 yr Congratulations on figuring out #2. The answer to #1 is in Lee's post (two posts above your first).
June 27, 200718 yr Thanks for the reply Comment! I didn't get what you meant at first because I was having some kind of brain cramp and I could not remember how the auto-enter calculation worked. I knew I had done it before with the special "ID Number" field I use but for some reason I kept trying to change the field itself to a calculation instead of having it run it during data entry. As always you guys come through Thanks again!
June 27, 200718 yr One last question Ok this setup works great except for one thing .... Is there a way to set a calculation up to only force the capitalization of the first letter of a word and leave the rest alone? We have some company names that have acronyms that are all capital. Example: KFC instead of Kfc TJ Maxx instead of Tj Maxx RES instead of Res I doubt it but I figured I'd ask.
June 27, 200718 yr Do not know if it works in your case you might try: UniversalCapitalizer.fp7 at http://www.foundationdbs.com/downloads.html
June 27, 200718 yr I think it would require examining each word in turn. It's possible using a looping script (or, if you had the Advanced version, a custom function), but not easy.
June 27, 200718 yr Ok I read up on the Universal Capitalizer and Custom Functions in general. Now since I do not have a Filemaker Pro Advanced I can not use the Custom Function designer to make a custom function. But when I read the help file about customer functions it says the Filemaker Pro and Filemaker Pro Advanced can both use customer functions. Does this mean that I can't design them but I could still somehow install the customer functions from the Univeral Capitalizer file?
June 27, 200718 yr Damnit then the whole capitalization thing is bunk. Is there something that can be typed in the field during data entry to make it ignore the calculation for just that record? The Univeral Capitalizer uses the tilde symbol "~" but I thinking that is something not built into Filemaker Pro.
June 27, 200718 yr You could do that too. It wouldn't ignore the calculation - but the calculation would take it into account and do something else when it's there.
August 1, 200718 yr I am fairly new to Filemaker. I have been designing solutions with it full-time for about seven months. I find that I often do things the more-complicated way before I discover the easy way. I did not know about the Proper function and I googled my problem several times without finding a solution so here is my solution. So here is my fix to ensure proper caps. It may be complicated but it works. I came up with this function to correct the capitalization of imported records in Filemaker. This calculation should be entered as an auto-enter calculation. There are some restrictions. I have set up these formulas with a maximum of five words and the last word of each field can not be longer than 20 characters. If you need help modifying the formula to your purpose, post here or on my blog at laurenkuhlman.wordpress.com The field I originally imported into is Category Imported. If(PatternCount ( Category Imported ;" " )=0;( TextStyleAdd ( Left ( Category Imported ; 1 ) ; Uppercase ) & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 1 ) + 2) ;20);Lowercase)) ;"") & If(PatternCount ( Category Imported ;" " )=1;( TextStyleAdd ( Left ( Category Imported ; 1 ) ; Uppercase ) & TextStyleAdd(Middle ( Category Imported; 2 ;(Position ( Category Imported ; " " ; 1 ; 1 ) - 2 ) ) ; Lowercase) & " " & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 1 ) + 1) ;1); Uppercase) & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 1 ) + 2) ;20);Lowercase)) ;"") & If(PatternCount ( Category Imported ;" " )=2;( TextStyleAdd ( Left ( Category Imported ; 1 ) ; Uppercase ) & TextStyleAdd(Middle ( Category Imported; 2 ;(Position ( Category Imported ; " " ; 1 ; 1 ) - 2 ) ) ; Lowercase) & " " & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 1 ) + 1) ;1); Uppercase) & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 1 ) + 2) ;(Position ( Category Imported ; " " ; 1 ; 2 ) - Position ( Category Imported ; " " ; 1 ; 1 ) - 2) );Lowercase) & " " & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 2 ) + 1) ;1); Uppercase) & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 2 ) + 2) ;20);Lowercase)) ;"") & If(PatternCount ( Category Imported ;" " )=3;( TextStyleAdd ( Left ( Category Imported ; 1 ) ; Uppercase ) & TextStyleAdd(Middle ( Category Imported; 2 ;(Position ( Category Imported ; " " ; 1 ; 1 ) - 2 ) ) ; Lowercase) & " " & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 1 ) + 1) ;1); Uppercase) & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 1 ) + 2) ;(Position ( Category Imported ; " " ; 1 ; 2 ) - Position ( Category Imported ; " " ; 1 ; 1 ) - 2) );Lowercase) & " " & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 2 ) + 1) ;1); Uppercase) & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 2 ) + 2) ;(Position ( Category Imported ; " " ; 1 ; 3 ) - Position ( Category Imported ; " " ; 1 ; 2 ) - 2) );Lowercase) & " " & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 3 ) + 1) ;1); Uppercase) & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 3 ) + 2) ;20);Lowercase)) ;"") & If(PatternCount ( Category Imported ;" " )=4;( TextStyleAdd ( Left ( Category Imported ; 1 ) ; Uppercase ) & TextStyleAdd(Middle ( Category Imported; 2 ;(Position ( Category Imported ; " " ; 1 ; 1 ) - 2 ) ) ; Lowercase) & " " & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 1 ) + 1) ;1); Uppercase) & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 1 ) + 2) ;(Position ( Category Imported ; " " ; 1 ; 2 ) - Position ( Category Imported ; " " ; 1 ; 1 ) - 2) );Lowercase) & " " & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 2 ) + 1) ;1); Uppercase) & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 2 ) + 2) ;(Position ( Category Imported ; " " ; 1 ; 3 ) - Position ( Category Imported ; " " ; 1 ; 2 ) - 2) );Lowercase) & " " & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 3 ) + 1) ;1); Uppercase) & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 3 ) + 2) ;(Position ( Category Imported ; " " ; 1 ; 4 ) - Position ( Category Imported ; " " ; 1 ; 3 ) - 2));Lowercase)& " " & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 4 ) + 1) ;1); Uppercase) & TextStyleAdd(Middle ( Category Imported ; (Position ( Category Imported ; " " ; 1 ; 4 ) + 2) ;20);Lowercase)) ;"") I realize now that this is an excessively complicated way to do this but, it does work.
August 2, 200718 yr How about storing a watch list of words to capitalize with a certain format and use that instead if you dont have access to custom functions. Captialized_Words.zip
Create an account or sign in to comment