GetAddresseeValues

Use this function to get the mapped values of addressee record members, as defined in the Extract Dictionary (XDD) Addressee record. You can use these values to update documents or mailer pages at print time. Use this function with the AddresseeMap capability and the AddresseeCount function.

Syntax

GetAddresseeValues(RecipName, Index, TagName)

Parameter

Description

RecipName

Enter the name of the recipient for whom you want to know the values of the corresponding addressee record. The name you enter should be a valid recipient name in the document set.

Index

(Optional) Enter the addressee index to identify the addressee you want to reference. The default is one (1).

TagName

(Optional) Enter the name of a prefix for the addressee record member names this function returns.

For instance, if you enter CST, the addressee Name value would be referenced as CST.Name. The default is the RecipName.

The TagName must adhere to DAL variable naming convention. If the RecipName is used and this name contains spaces, the system replaces the spaces with underscores.

When used as a function, GetAddresseeValues returns a one (1) if successful or zero (0) if the recipient or named index was not found. If it returns a zero (0), the system creates the variables with empty values.

Example

Here are some examples.

Function

Result

Explanation

If GetAddresseeValues("Memo",2)

 

If the Memo recipient contains at least two addressee members, the second member is retrieved and assigned to the appropriate DAL variables. If not, the GetAddresseeValues function returns a zero (0) which indicates a false result to the If statement.

#Cnt = GetAddresseeValues("Agent")

0

The system tries to locate the first addressee defined for the Agent recipient. If Agent is not a valid recipient or does not have any addressees mapped, the system sets #Cnt to zero (0).

#CNT2 = GetAddresseeValues("Recipient",1, "CST");

0

This says that you want your recipient values tagged with "CST", so you end up with variables you can reference like CST.NAME, CST.CITY, CST.STATE.

Without the quotes, you are saying that whatever value in CST will be the token name. So, you either get an error because this is an undefined variable, or if the variable happens to contain an invalid value, you would get the 0 return value.

XYZ="ABC"

#CNT2 = GetAddresseeValues("Recipient",1, XYZ);

 

This shows how a variable can define the text to tag to the recipient variables.

CST=""

#CNT2 = GetAddresseeValues("Recipient",1, CST);

0

If you pass in an empty string as the tag, it will revert to using the recipient name as the tag — just as if you did not specify the parameter.

Here is another example:

If  GetAddresseeValues( "Customer", 2)
    Return ( Customer.Name )
END
Return ("Not Provided");

This example script locates the Customer recipient’s second addressee and assigns the appropriate values to the DAL variables. If the recipient index is found, a non-zero (true) result causes the If statement to proceed with the subsequent statements and return the name of the addressee member.

If the recipient or addressee index is not located, the DAL variable Customer.Name will be empty. In this example, the script does not use the empty value, but instead returns the following text:

Not Provided

See also