* Concatenating repository address subfields

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

Concatenating repository address subfields

Post by Gary_G » 09 Apr 2023 16:03

I have no issues in getting access to the fields content of the address or address subtags of a repository.
However; I would like to know if there is a simple way of creating a string that includes the comma-separated address and up to the 7 possible address subtags that effectively form a mailing label. I need such a string for embedding in a function call.

Currently; I can see that one could repeatedly use something like the CombineText function to build the string, but does FH7 offer an easier/quicker way?

Can one use something based on the way the =Text function?
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: Concatenating repository address subfields

Post by Gary_G » 09 Apr 2023 16:12

***No answer required***
Seems there is no reason that the =Text function can't be used.
Will double-check my code. Likely finger problems.
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: Concatenating repository address subfields

Post by Gary_G » 09 Apr 2023 16:33

It's getting easier to construct the functions I need for my templates. The following code snippet creates a full mailing address from the address defined in a repository and may be valuable to others. One would just need to substitute for the repository designation, "RECIPIENTS_ORG", and make sure that the repository has included the standard sub-fields.
{=TextPart(Text(%SOUR.~RP-RECIPIENTS_ORG>ADDR% . "," . %SOUR.~RP-RECIPIENTS_ORG>ADDR.ADR1% . "," . %SOUR.~RP-RECIPIENTS_ORG>ADDR.ADR2% . "," . %SOUR.~RP-RECIPIENTS_ORG>ADDR.ADR3% . "," . %SOUR.~RP-RECIPIENTS_ORG>ADDR.CITY% . "," . %SOUR.~RP-RECIPIENTS_ORG>ADDR.STAE% . "," . %SOUR.~RP-RECIPIENTS_ORG>ADDR.POST% . "," . %SOUR.~RP-RECIPIENTS_ORG>ADDR.CTRY%),1,0,TIDY)}
Gary Gauthier
Hunting History in the Wild!

Post Reply