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-parse-dn dest-dn-format="dest-dn" src-dn-format="ldap">
<token-text>o=foo, l=bar, dc=County, dc=Organizations,
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">
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.