Novell is now a part of Micro Focus

Additional Default Rules to Handle Multi-Valued Attributes

Novell Cool Solutions: Tip
By William C Schneider

Digg This - Slashdot This

Posted: 17 Mar 2005


In Active Directory, givenName, surname, and title are single-valued attributes. In eDirectory, these attributes may have multiple values. Allowing multiple values to sync to Active Directory causes a schema violation error, and the attributes do not populate. The AD driver by default has a rule that breaks down the title attribute to one value, but the naming attributes are not broken down this way.


Create two additional rules to strip those attributes to one value, but only if the attribute is not changing. If the attribute is changing, there will be two values present, and stripping one of those values frequently returns a null string.



if XPATH expression true "count(*[@attr-name = 'Given Name']//value) > 1" 
AND if operation attribute 'Given Name' not changing 
set local variable("given-name-count",XPATH("count(*[@attr-name = 'Given Name']//value)")) 
set local variable("given-name",XPATH("./add-attr[@attr-name='Given Name']/value[$given-name-count]")) 
strip operation attribute("Given Name") 
set destination attribute value("Given Name",Local Variable("given-name"))

This example grabs the highest (usually the last entered) value and places it into a local variable. The attribute is then removed from the XML document and recreated with the single value that was loaded into the variable. The same rule is used for each of the three attributes.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates