How to automaticly upper case the first letter of a word in the field?
Have a look at the Proper () function
also, see this similar post
> Have a look at the Proper () function
Use this script step with a script trigger on that field (OnObjectSave)
TextStyleAdd ( Self ; TitleCase )
TextStyleAdd ( Self ; TitleCase ) doesn't change the value of the text
Proper (text) does
Perhaps it would be best to start by asking what is the purpose of "automaticly upper case the first letter of a word (which word?) in the field".
I can write michael horak in the CustName field and file maker automatically write Michael Horak
Easy to understand?
Jose G Calderon
Jose, look at the function "Proper()"
You can define your field to auto-enter (by Calculation) to
Proper ( Self ).
-- sent from my iPhone4 --
jdaservice wrote: I can write michael horak in the CustName field and file maker automatically write Michael HorakEasy to understand?
Easy to understand, not so easy to implement - see:
Hi jadaservice, here a custom function that can do what you need, by Howard Schlossberg, FM Professional Solutions, Inc.
Nice, Howard. Good implementation for titles! I like that you have 'always lower' and 'always upper' lists that are editable. I suppose I'd want these to be server-accessible fields so that others can edit them. Then again, perhaps there is better control with hard-coding them.
Sure Beverly, in FM12 you can use ExecuteSQL() to point to dedicated table (words uppercase, words lowercase) and modify the custom function to solve this request.
Yes, Fabio, of course this could use eSQL() to get the lists!
My debate was: hard-coded in the Custom Function (as Howard had) vs using other storage? I think I concluded that the "who" can edit these might determine where the values are stored. A developer with tight control (and the only copy of FMPA!) would probably not want access otherwise. A client with desire to edit may encourage the development of other storage...
Nice that we have so many options, eh?
Thanks to all of you guys that helped me. I.m an amateur using filemaker12 I was using Alpha5 where this is super easy to do, if any one of you used alpha5 ever you know what I'm talking about. the problem with alpha5 is that they don't deal with mac's and we decided to switch to Macintosh
FileMaker is easy too. Maybe not super easy, but easy
> I was using Alpha5 where this is super easy to do
Is there a calculation/function/custom function that will capitalize the first word in every sentence in a paragraph?
Can the user-defined lists in Howard Schlossberg's Title custom function somehow be used for this?
tshapiro wrote: capitalize the first word in every sentence in a paragraph?
capitalize the first word in every sentence in a paragraph?
That depends on how you define "sentence". Filemaker understands what a word is (well, most of the time), but sentence might be more difficult to explain to a computer.
To expand on what Michael said, you would have to make a list of all the possible characters or combination of characters that can begin or end a sentence.
The obvious ones for ending are . ? ! but you may also have ." ?" !"
Sentences may start with letters, numbers or " or '
Can you assume that all the sentences are grammatically correct? Not every sentence is "perfect". <--- Note the period should be inside the quotes.
Will there always be exactly one space after the end of a sentence?
If the rules can be clearly defined, then it is possible to write a recursive function to do what you want.
All true! In this particular case, I could most likely declare that a sentence is a string of text that ends with a period-space. I've written a few functions but when it comes to recursion my brain gets tangled!
If I were to script it, I could
- substitute "##" or some other symbol for each paragraph in the text
- convert the text to a list (of sentences)
- capitalize the first letter of the first word of each value (sentence) in the list
- convert the "##" symbols back to paragraphs
Not too elegant, but it seems like it could work as a script trigger...?
I should mention the ultimate goal: In a GO solution, the user has asked if Filemaker could do the same capitalization as Mail and Messages on the iPad.
Retrieving data ...