Salutation for an address
There's a range of possibilities to retrieve the salutation used in an addresse.
Syntax
AdrSalutation (<nAddressID>, [bOnlyFirstPart], [nLanguageID])
Parameters |
Description |
nAddressID |
ID of the address (ad_numero of a foreign key). |
bOnlyFirstPart |
Optional: if set to .t. (TRUE) returns only the first part of the salutation. If omitted it is defaulted to .f. (FALSE). |
nLanguageID |
Optional: specifies the language of the salutation. If omitted it is defaulted to the language of the address (ad_langue). |
Examples
*/ Return only the first part of the Salutation of the address specified, in the language set for the address.
AdrSalutation(ad_numero, .t.)
*/ Return the Salutation and the Last Name of the address specified, in the language set for the address.
AdrSalutation(ad_numero, .f.)
*/ Add a comma and a carriage return to the salutation returned.
alltrim(AdrSalutation(ad_numero,.t.)) + ',' + chr(10)
*/ Return a salutation in the language specified in the document (and that can be different from the standard one of the address). The documents table must be open when the function is used.
AdrSalutation(do_adr1, .t., do_langue)