Placing DNs in Multi-Valued Attributes

Placing DNs in Multi-Valued Attributes


A Forum reader recently asked:

"I am writing a policy where I need to run a query to get a list of one or more DNs, then place those DNs as the values of a multi-valued attribute in my destination data source. How do I do this? Can I use the do-add-dest-attr-value action and just specify the query as the values to add, or do I need to place the results of the query in a local variable and do something with that?

The driver will load User objects into eDirectory from a JDBC data source. We have a custom multi-valued attribute on each of these users that lists a number of locations for which the user has some administrative responsibilities."

And here's the response from Father Ramon ...


You need to use do-for-each to iterate over the values you are expecting to get back. For example:

<token-query class-name="Locality">
<token-parse-dn dest-dn-format="dest-dn" src-dn-format="ldap">
<token-text>o=foo, l=bar, dc=County, dc=Organizations,
<do-add-dest-attr-value name="xxx">
<token-xpath expression="$current-node/@src-dn"/>

If your custom attribute syntax is DN, then the above should work. If it is a string and you want it in LDAP format, then you'll want to change the value to something more like this:

<token-parse-dn src-dn-format="qualified-slash" dest-dn-format="ldap">
<token-xpath expression="$current-node/@qualified-src-dn"/>


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2007-04-18 11:33
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.