Responsys Interact Built-in Functions Guide
Page 41
The select() built-in function has the same effect as nesting calls to the cond() built-in function,
but is much easier to use when you want to test for multiple values.
Example: You could use this (all on one line):
$select(lookup(Breed),
afghan, escapecommas(document(DogInfo, Afghans)),
boxer, escapecommas(document(DogInfo, Boxers)),
collie, escapecommas(document(DogInfo, Collies)),
dachshund, escapecommas(document(DogInfo, Dachshunds)),
doberman, escapecommas(document(DogInfo, Dobermans)),
escapecommas(document(GenInfo, AboutOurService)))$
rather than this (all on one line):
$cond(eq(lookup(Breed), afghan), escapecommas(document(DogInfo, Afghans)),
cond(eq(lookup(Breed), boxer), escapecommas(document(DogInfo, Boxers)),
cond(eq(lookup(Breed), collie), escapecommas(document(DogInfo, Collies)),
cond(eq(lookup(Breed), dachshund), escapecommas(document(DogInfo, Dachshunds)),
cond(eq(lookup(Breed), doberman), escapecommas(document(DogInfo, Dobermans)),
escapecommas(document(GenInfo, AboutOurService)))))))$
You can also use a segment group name as the test value, as shown below (all on one line):
$select(lookup(OwnerSegment),
afghan, escapecommas(document(DogInfo, Afghans)),
boxer, escapecommas(document(DogInfo, Boxers)),
collie, escapecommas(document(DogInfo, Collies)),
dachshund, escapecommas(document(DogInfo, Dachshunds)),
doberman, escapecommas(document(DogInfo, Dobermans)),
escapecommas(document(GenInfo, AboutOurService)))$
Notes: Since the documents inserted in the examples above include commas, each call to the
document() function is enclosed in a call to the escapecommas() function. This prevents the
commas in the inserted documents from being interpreted incorrectly.
When you nest functions, only the outermost function is enclosed in dollar signs.
setglobalvars() function
Usage
$setglobalvars(name1, value1, name2, value2, ...)$
When passed a list of name-value pairs, this built-in function makes the specified variable values
available globally during the personalization of a message (by means of the corresponding name, as in
$lookup(name1)$) within the context of the current campaign document or subdocument.
The difference between the setvars() function and setglobalvars() is that
setlgobalvars() sets a variable globally regardless of which subdocument it is located in.