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?
* Concatenating repository address subfields
-
Gary_G
- Superstar
- Posts: 304
- Joined: 24 Mar 2023 19:05
- Family Historian: V7
- Location: Calgary, Alberta, Canada
Concatenating repository address subfields
Gary Gauthier
Hunting History in the Wild!
Hunting History in the Wild!
-
Gary_G
- Superstar
- Posts: 304
- Joined: 24 Mar 2023 19:05
- Family Historian: V7
- Location: Calgary, Alberta, Canada
Re: Concatenating repository address subfields
***No answer required***
Seems there is no reason that the =Text function can't be used.
Will double-check my code. Likely finger problems.
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!
Hunting History in the Wild!
-
Gary_G
- Superstar
- Posts: 304
- Joined: 24 Mar 2023 19:05
- Family Historian: V7
- Location: Calgary, Alberta, Canada
Re: Concatenating repository address subfields
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!
Hunting History in the Wild!