jeemart Posted June 15, 2005 Posted June 15, 2005 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.
RalphL Posted June 15, 2005 Posted June 15, 2005 Use the Proper Function with the LeftWord Function. Proper ( Leftword (Text; 1 ))
-Queue- Posted June 15, 2005 Posted June 15, 2005 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.
jeemart Posted June 22, 2005 Author Posted June 22, 2005 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
-Queue- Posted June 23, 2005 Posted June 23, 2005 In the field definition, make it an auto-enter calculation and deselect 'do not replace existing values'.
jeemart Posted January 25, 2006 Author Posted January 25, 2006 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
Lee Smith Posted January 25, 2006 Posted January 25, 2006 Why not use Auto Enter Calculation Proper (Text) And deselect the "do not replace existing values (if any) Lee
jeemart Posted January 25, 2006 Author Posted January 25, 2006 The proper function seems to work great. Thanks Martin
Botuist Posted June 27, 2007 Posted June 27, 2007 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!
Botuist Posted June 27, 2007 Posted June 27, 2007 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!
comment Posted June 27, 2007 Posted June 27, 2007 Congratulations on figuring out #2. The answer to #1 is in Lee's post (two posts above your first).
Botuist Posted June 27, 2007 Posted June 27, 2007 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!
Botuist Posted June 27, 2007 Posted June 27, 2007 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.
Anuviel Posted June 27, 2007 Posted June 27, 2007 Do not know if it works in your case you might try: UniversalCapitalizer.fp7 at http://www.foundationdbs.com/downloads.html
comment Posted June 27, 2007 Posted June 27, 2007 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.
Botuist Posted June 27, 2007 Posted June 27, 2007 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?
comment Posted June 27, 2007 Posted June 27, 2007 You can use them, but you need Advanced to create AND to install them.
Botuist Posted June 27, 2007 Posted June 27, 2007 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.
comment Posted June 27, 2007 Posted June 27, 2007 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.
LaurenKuhlman Posted August 1, 2007 Posted August 1, 2007 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.
mr_vodka Posted August 2, 2007 Posted August 2, 2007 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
Recommended Posts
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