* Setting a word to sentence-case

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
Gary_G
Superstar
Posts: 304
Joined: 24 Mar 2023 19:05
Family Historian: V7
Location: Calgary, Alberta, Canada

Setting a word to sentence-case

Post by Gary_G » 11 Apr 2023 20:22

Does FH7 have a way to set just the initial character of a meta-field string to upper case and the rest to lower case?
RootsMagic has this and some templates that are converted to FH7 do not look "right" without it.
Gary Gauthier
Hunting History in the Wild!

User avatar
tatewise
Megastar
Posts: 27074
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Setting a word to sentence-case

Post by tatewise » 11 Apr 2023 20:49

There is no single function but the following does achieve that objective:
<{=ToUpper( LeftText( %SOUR.~TX-FIELD%, 1 ) )}{=ToLower( MidText( %SOUR.~TX-FIELD%, 2 ) )}>
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Gary_G
Superstar
Posts: 304
Joined: 24 Mar 2023 19:05
Family Historian: V7
Location: Calgary, Alberta, Canada

Re: Setting a word to sentence-case

Post by Gary_G » 11 Apr 2023 21:21

Thanks, Mike;

It seems to come down to what we discussed a while ago.
FH7 is a slightly light string handling capabilities.
Not a big issue, but it can be an annoyance when one needs them.
Sort-of wish that FH7 had the ability to have add-on function-libraries written in LUA.
That would solve it all.
Gary Gauthier
Hunting History in the Wild!

User avatar
tatewise
Megastar
Posts: 27074
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Setting a word to sentence-case

Post by tatewise » 11 Apr 2023 21:55

See Wish List Ref 547 Run Plugins via Expressions that requests exactly what you are asking for and has existed for over 6 years. Please Vote for it.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Gary_G
Superstar
Posts: 304
Joined: 24 Mar 2023 19:05
Family Historian: V7
Location: Calgary, Alberta, Canada

Re: Setting a word to sentence-case

Post by Gary_G » 11 Apr 2023 23:01

Thanks, Mike.
I'll put my check against that one. It would make sorely needed functions available and greatly shorten some constructs.
Gary Gauthier
Hunting History in the Wild!

Post Reply