Temporary MMS Template Variables Are Incapable of Holding Multi-Valued Attributes (272531)



The information in this article applies to:

  • Microsoft Metadirectory Services 2.1
  • Microsoft Metadirectory Services 2.2

This article was previously published under Q272531

SUMMARY

Within Microsoft Metadirectory Services (MMS), you can create temporary template variables at any time. Their format requires that they begin with a "$v_". For example, $v_tempVar is a valid temporary variable if it appears in an MMS template. However, these variables can only hold single values. If they are assigned the values from a multi-valued attribute, only the last value in the multi-valued array is retained, although no error is logged.

For example, assume that there is an import parsing template that includes the following definition for the multi-valued attribute objectclass:
ObjectClass:$I_READ_ATTRIBUTE("", multivalued:attribute:$objectclass).
				
The import file should then contain (among other data) the following line:
ObjectClass:zcPerson
Person
Top
				
The multiple values of the object class attribute will be successfully parsed, and placed into the multi-valued cd attribute objectclass.

If, however, the import file is parsed by using the following parsing definition, the same results will not be achieved by the temporary variable $v_tempVar:
ObjectClass:$I_READ_ATTRIBUTE("", multivalued:attribute:$v_tempVar).
				
In this case, $v_tempVar will contain only the value Top, although the logs would indicate that all three object class values were successfully stored.

The first example, where the information is parsed directly into a cd variable, is the recommended method for accepting multi-valued attributes from import files. A multi-valued attribute should never be assigned to a temporary template variable.

Modification Type:MinorLast Reviewed:1/25/2006
Keywords:kbenv kbfix kbinfo KB272531