Cannot Flow Null Multi-Valued Attributes to Connected Directory (281622)



The information in this article applies to:

  • Microsoft Metadirectory Services 2.2
  • Microsoft Metadirectory Services 2.2 SP1

This article was previously published under Q281622

SYMPTOMS

The Management Agent may not flow a null multi-valued attribute out to the connected directory. If the attribute is a single-valued attribute, the null value successfully flows out to the connected directory. This problem is seen when a multi-valued attribute in MMS is deleted so that the value is null.

CAUSE

The output templates uses the $multivalued function to correctly format the text in the outgoing (create) file, for example:
($multi_valued("0",$userCertificate;base64,"-userCertificate;base64: "))
				
The function requires a value to process and will not work with a null value.

RESOLUTION

To work around this problem:
  1. Remove the existing simple or advanced attribute flow rules for this attribute.
  2. Type the following into the advanced attribute flow script, replacing userCertificate with the name of the target attribute:Advanced flowscript Modification:

    replace
    $cd.userCertificate = $mv.userCertificate
    					
    with:
    IF $EXIST($cd.userCertificate) = T
    ###########################################################
    # the attribute existed in the connected directory the last 
    #  time that we ran a discovery
    ###########################################################
    THEN
    IF $EXIST($mv.userCertificate) = F
    #################################################
    # the metaverse value has been cleared so send a 
    # NULL to the connected directory
    #################################################
    THEN
                 ###################################################
                 # even though this attribute does not appear in the 
                 # output template, a "cd" assignment *must* be made 
                 # to force the creation of the create file
                 ###################################################
    $v_userCertificate=-userCertificate:
                $cd.userCertificate = $null
    ELSE
                $cd.userCertificate = $mv.userCertificate
    ENDIF
    ELSE
             ##################################################
             # the connected directory did *not* have the
             # attribute the last time that we ran a discovery
             ##################################################
    $cd.userCertificate = $mv.userCertificate
    ENDIF
    					
  3. Modify the EXPORT template Add/Mod with:
    ($multi_valued("0",$userCertificate;base64,"-userCertificate;base64: "))
    ($v_userCertificate)
    					

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Modification Type:MajorLast Reviewed:5/28/2003
Keywords:kbbug kbenv KB281622