How to Process List Members from a MULTILINED Attribute (298654)



The information in this article applies to:

  • Microsoft Metadirectory Services 2.2
  • Microsoft Metadirectory Services 2.2 SP1

This article was previously published under Q298654

SUMMARY

This article describes how to process list members from a MULTILINED attribute.

MORE INFORMATION

List members that are imported from a connected directory may appear in the import file as either multilined or multivalued.

Example of Multilined

-member:Test User1
Test User2
Test User3
Test User4

Example of Multivalued

-member:Test User1
-member:Test User2
-member:Test User3
-member:Test User4

If the attribute is multilined, the Microsoft Metadirectory Services (MMS) Synchronization engine (Importt.exe) may process only the first entry (Test User1), and then ignore all other members because it is expecting the membership to be multivalued rather than multilined.

Importt.exe can handle the multilined format, but first you must make some template changes in the management agent.

In the parsing template (see Design management agent\Control Metadirectory\Parsing Templates), you would normally use the following for a multivalued attribute:
+-member: $i_member("+member:-$v_ldapDn")
				
In the preceding example, the $i_member function is used in the parsing template without using any construction templates (everything is done in the parsing template). While this works for a multivalued attribute, this does not work with a multilined attribute. It must first be parsed into a multivalued attribute, and then the $i_member function must be used on that attribute. An existing miscellaneous attribute is used to store the data. The attribute must be modified to store multivalued data. To modify the attribute:
  1. In the Compass client, access the server object under The Known Universe.
  2. In the Attributes container, go to zc, and then to Basic.
  3. Under Basic, open zcMisc1, and then click Properties on the Actions menu.
  4. In the Attribute Properties dialog box, click Multi under Values.
The required modifications to the parsing template are:
-member: $i_read_attribute("$v_zvalue","multivalued:attribute:$cd.zcmisc1")
				
This should effectively convert it from a multilined attribute to a multivalued one. After you do so, you can apply the $i_member function to create the list membership.

Next, in your construction template (see Design management agent\Control Metadirectory\Construction Templates\Metaverse), assign that attribute to the $i_member function. Find the code near line 60 which should appear (prior to modification) like this:
if $v_ldapObject=LIST
then
     $v_dn_inter = $get_substring ( "$v_dn", "cn=", " ")
     $v_dn = LIST=$v_dn_inter
endif
				
Add the line before the closing endif statement so that code looks like this:
if $v_ldapObject=LIST
then
     $v_dn_inter = $get_substring ( "$v_dn", "cn=", " ")
     $v_dn = LIST=$v_dn_inter
     $i_member("") = $cd.zcMisc1
endif
				
Note that this is in the Metaverse template and not the Lists template. The $i_member function adds the members to the list in the Metaverse with the correct DN. The metaverse list object should show alias entries to the list members. This code only works on MMS 2.2 and later.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Modification Type:MajorLast Reviewed:6/17/2005
Keywords:kbenv kbhowto KB298654