See also CombineText, ExistsText, NotExistsText and ForceText.
| section 1 | Prefix to be output if either A or B are not empty |
| section 2 | Separator to be output if both A and B are not empty |
| section 3 | Suffix to be output if either A or B are not empty |
| section 4 | Alternative text to be output if both A and B are empty |
| section 1 | Text to be output if A only is not empty. If this text contains the special code "#A" (without the quotes), that code will be substituted with the value of the A string. |
| section 2 | Text to be output if both A and B are not empty. If this text contains the special code "#A" (without the quotes), that code will be substituted with the value of the A string. If this text contains the special code "#B" (without the quotes), that code will be substituted with the value of the B string. |
| section 3 | Text to be output if B only is not empty. If this text contains the special code "#B" (without the quotes), that code will be substituted with the value of the B string. |
| section 4 | Text to be output if both A and B are empty |
%INDI.OCCU% =CombineText_AB(%INDI.OCCU.DATE:YEAR%,%INDI.OCCU.PLAC:TIDY%,"1#(#, #)")
%INDI.OCCU% =CombineText_AB(%INDI.OCCU.DATE:YEAR%,%INDI.OCCU.PLAC:TIDY%,"1#[#; #]#(no date/place)")
If used in a diagram text scheme, for occupations farmer (in 1985, London), engineer (in August 1987), labourer (Dorset), and doctor (no date or place supplied), the first example would output this:
farmer (1985, London)
engineer (1987)
labourer (Dorset)
doctor
If the second example were used instead, with the same set of occupations and dates/places, this would be output instead:
farmer [1985, London]
engineer [1987]
labourer [Dorset]
doctor (no date/place)
=CombineText_AB(%INDI.OCCU.DATE%,%INDI.OCCU.PLAC%,"2|Occ. date only (#A)|Occ. date & place|Occ. place only|Neither Occ. data nor place")