Page 1 of 1

Concatenating repository address subfields

Posted: 09 Apr 2023 16:03
by Gary_G
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?

Re: Concatenating repository address subfields

Posted: 09 Apr 2023 16:12
by Gary_G
***No answer required***
Seems there is no reason that the =Text function can't be used.
Will double-check my code. Likely finger problems.

Re: Concatenating repository address subfields

Posted: 09 Apr 2023 16:33
by Gary_G
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)}