* Chart Text 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
PRH
Newbie
Posts: 4
Joined: 18 Jul 2016 17:21
Family Historian: V7

Chart Text Case

Post by PRH » 21 Apr 2023 18:37

I have added relationships to a Relatives chart and changed the format of the names, all good so far.

The relationships are shown is lower case and would like to change it to Initial Captitals!

I can see there are functions to change the text ToLower and ToUpper but nothing on Initial Capitals. I could capitilise the first character of each word but the expression might be a little long/complicated. Hoping there is an easier way that I cant see?

Hope someone can help....

Here is an example of the text (see Relationship):
Attachments
Relationships.png
Relationships.png (17.48 KiB) Viewed 336 times

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

Re: Chart Text Case

Post by tatewise » 21 Apr 2023 19:41

Yes, it will get complex. See Setting a word to sentence-case (21791) which explains how to handle one word!

On top of that, the Section(...) function will be needed to extract each space-separated word.

The following will capitalise just the first letter of the whole relationship:
=Text( ToUpper( LeftText( Relationship( FileRoot(), , TEXT, 1 ), 1 ) ) . MidText( Relationship( FileRoot(), , TEXT, 1 ), 2, 0 ) )

The righthand text is already lowercase so that does need the ToLower(...) function.

Although, thinking about it, in a Text Scheme item the outer =Text(...) function is also not needed:
=ToUpper( LeftText( Relationship( FileRoot(), , TEXT, 1 ), 1 ) )=MidText( Relationship( FileRoot(), , TEXT, 1 ), 2, 0 )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
PRH
Newbie
Posts: 4
Joined: 18 Jul 2016 17:21
Family Historian: V7

Re: Chart Text Case

Post by PRH » 22 Apr 2023 12:28

Many thanks Mike, will have a play......

Post Reply