Managing multi-value Attributes

In some cases, object or identity attributes store multiple values. To enable a macro to return all possible values for a given attribute, you may include an optional argument after the attribute name—the List argument. The List argument is referenced only if the action of reading the attribute from the designated identity or object results in multiple values. It designates a delimiter an escape character. The macro system uses this information to format multi-value attributes in a text string.

The standard delimiter is a comma ( , ); the standard escape character is a backslash ( \ ). However, you can designate any delimiter or escape character using the following syntax:

"<delimiter><escape character>"

For example:

",\"

The complete argument string appears as follows:

$macro_keyword[$object_identification$,"attribute_name",",\"]$

For example:

$Config[$Event.Component$,"Contact",",\"]$

To illustrate how the List argument works, consider the following examples.

The following examples are color coded to help you identify each macro component.

The user SVChristopher is a member of the IT, Support, and Everyone groups. If the value of the $Event.Component$ macro points to the \VED\Identity\SVChristopher object, then the following macros behave as described:

List Argument Examples

Macro

Result String Is...

$Config[$Event.Component$,"Group Membership"]$

The first value for the "Group Membership" attribute in the Identity object.

In this example, the results string is "IT".

$Config[$Event.Component$,"Group Membership",",\"]$

A comma-separated list of all values for the "Group Membership" attribute in the Identity object.

In this example, the results string is "IT,Support,Everyone".

$Config[$Event.Component$,"Group Membership","S&"]$

A list of the values for the "Group Membership" attribute in the Identity object. As indicated in the List argument, the letter "S" is used to delimit each value in the result string. If the letter "S" is part of the attribute value, it is escaped in the result string with the ampersand ( & ) character.

In this example, the results string is "ITS&SupportSEveryone".

Note that the first character of the second value, Support, matches the List argument’s designated delimiter character ( S ), so the "S" in Support is escaped with an ampersand ( & ).

In the following example, the user DSteel is a member of the Everyone group. If the value of the $Event.Component$ macro points to the \VED\Identity\DSteel object, then the following macros behave as described:

List Argument Examples

Macro

Result String Is...

$Config[$Event.Component$,"Group Membership"]$

The first and only value for the attribute "Group Membership".

In this example, the results string is "Everyone".

$Config[$Event.Component$,"Group Membership",",\"]$

Not delimited because only a single value was found.

In this example, the results string is "Everyone".

$Config[$Event.Component$,"Group Membership","D&"]$

Not delimited because only a single value was found.

In this example, the results string is "Everyone".