* Syntax for 'Place Formats', 'Short' field?

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

Syntax for 'Place Formats', 'Short' field?

Post by Gary_G » 05 Apr 2023 23:37

What is the syntax needed to use the "Place Formats", "Short" field, to get the first part of the place-name contained in a template meta-field called {Commune}? I believe one uses the TEXTPART function.

I've tried it various ways, but FH7 complains that the syntax is incorrect.
Last edited by tatewise on 06 Apr 2023 09:54, edited 1 time in total.
Reason: Replace " with ' in subject.
Gary Gauthier
Hunting History in the Wild!

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

Re: Syntax for 'Place Formats', 'Short' field?

Post by tatewise » 06 Apr 2023 10:04

Try:
{=TextPart( %SOUR.~PL-COMMUNE%, 1 )}

That combines the syntax for a function {=Function( ... )} with a metafield data ref shortcut %SOUR.~PL-COMMUNE% as described in the Help for Source Template Formats under How to Use Data References or Functions within Formats and the Help for Understanding Data References under Data References And Metafields as discussed before.
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: Syntax for 'Place Formats', 'Short' field?

Post by Gary_G » 06 Apr 2023 10:45

Thanks, "tatewise";

It's obvious that I'm still having trouble wrapping my head around forming some of the function calls.
I'll reread the material yet again and look for some further examples.
Gary Gauthier
Hunting History in the Wild!

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

Re: Syntax for 'Place Formats', 'Short' field?

Post by Gary_G » 06 Apr 2023 15:55

"tatewise";

I thought I'd mention in this thread that I looked at, Understanding Data References, https://www.family-historian.co.uk/help ... ences.html

It was helpful, But I note that the section, DATA REFERENCES AND METAFIELDS, has a table of 3-letter type prefixes to use for metafield types in data reference shortcuts, but does not contain one for address-type fields. Do they require a different technique to look up?
Gary Gauthier
Hunting History in the Wild!

User avatar
ColeValleyGirl
Megastar
Posts: 4853
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Syntax for 'Place Formats', 'Short' field?

Post by ColeValleyGirl » 06 Apr 2023 16:07

Gary_G wrote:
06 Apr 2023 15:55
"tatewise";

I thought I'd mention in this thread that I looked at, Understanding Data References, https://www.family-historian.co.uk/help ... ences.html

It was helpful, But I note that the section, DATA REFERENCES AND METAFIELDS, has a table of 3-letter type prefixes to use for metafield types in data reference shortcuts, but does not contain one for address-type fields. Do they require a different technique to look up?
IIRC, they're usually text (TX-) fields, as there's no underlying record as there is in e.g. PLace

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

Re: Syntax for 'Place Formats', 'Short' field?

Post by Gary_G » 06 Apr 2023 16:16

"ColeValleyGirl";

Thank you.
So they are "Text" fields? Good to know. I'll try it.
The FH7 template definition had me totally confused, as it shows the type as "Address". (see below)
Address example.png
Address example.png (36.61 KiB) Viewed 402 times
Gary Gauthier
Hunting History in the Wild!

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

Re: Syntax for 'Place Formats', 'Short' field?

Post by Gary_G » 06 Apr 2023 16:35

Unfortunately; Im still having issues in getting the address from the citation portion of a template and printing it as part of a citation. I know that I have some work to do to "tighten up the following Footnote template code, but I need to figure this out before that.
{Year} census of {=TextPart( %SOUR.~PL-COMMUNE%, 1, 0, TIDY_REV)}, <p. {Page}>, <{=TextPart(%CUR~CITN.~TX-STREET%, 1)}>, <house {House}>, <family {Family}>, <{Principal:SURNAME} <({Principal:GIVEN})>>, <{Age} years>, <{Role}>; image(s) {Image_no} from France, <{Repository}>, <<i>{Webpage_Title}</i>> <({Webpage_URL} : accessed {Accession_Date})>; <citing< {=TextPart( %SOUR.~PL-COMMUNE%, 1 )}>, <copie {Copy_Type}>, <cote [microfilm] {Cote_microfilm}>, <cote [original] {Cote_original}>>, <{Repository}>, <{Repository:LOCATION}>.
Gary Gauthier
Hunting History in the Wild!

User avatar
ColeValleyGirl
Megastar
Posts: 4853
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Syntax for 'Place Formats', 'Short' field?

Post by ColeValleyGirl » 06 Apr 2023 16:45

My bad! They're "AD-" fields.

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

Re: Syntax for 'Place Formats', 'Short' field?

Post by Gary_G » 06 Apr 2023 16:48

Aha! So they are not in the documentation noted.
Thank you. I was pulling my hair out wondering what was happening.
Sorry to ask so many questions, but I am still finding my way...
Gary Gauthier
Hunting History in the Wild!

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

Re: Syntax for 'Place Formats', 'Short' field?

Post by Gary_G » 06 Apr 2023 16:52

It lives!!!
Thank you "ColeValeyGirl".
Screenshot 2023-04-06 at 10.50.34 AM.png
Screenshot 2023-04-06 at 10.50.34 AM.png (30.86 KiB) Viewed 383 times
Gary Gauthier
Hunting History in the Wild!

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

Re: Syntax for 'Place Formats', 'Short' field?

Post by tatewise » 06 Apr 2023 17:09

The AD code is in the FH built-in Help for Understanding Data References but missing from the online equivalent Help page.
Perhaps you would like to report that omission to CP?
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: Syntax for 'Place Formats', 'Short' field?

Post by Gary_G » 06 Apr 2023 18:06

"tatewise";

Done.
Gary Gauthier
Hunting History in the Wild!

Post Reply