Pushing Null Attribute Values to Netscape (258741)



The information in this article applies to:

  • Microsoft Metadirectory Services 2.1
  • Microsoft Metadirectory Services 2.2

This article was previously published under Q258741

SYMPTOMS

If a value in the metaverse is removed (set to null), this null value may not be sent to the Netscape directory.

CAUSE

The Netscape management agent (MA) is not designed to send "nothing" as a value, unless the MA is configured always to send a value to the connected directory. Typically, a value is sent out through the create file if all of the following conditions exist:
  • An appropriate attribute flow rule exists.
  • An appropriate change occurs in the value of the target attribute.
  • An appropriately formatted output template definition exists for the target attribute.
In most cases, the output construction template uses the "send value if it exists" option to minimize the amount of information that the MA sends to the connected directory. This option uses parentheses to surround the output format statement. For example, the following line appears in the output template for the Netscape Lightweight Directory Access Protocol (LDAP) MA:

(-description: $cd.description)

This format statement represents the following rule:

If the current connected directory (CD) object contains an attribute that is called "description", then produce a line in the create file that has this format, and make the appropriate substitution for the true value of $cd.description.

The expected output in the create file is:

description: this is the record's description

A consequence of this feature is that a value of "nothing" (which is required to clear an existing value in the connected directory) is determined to be nonexistent and is never sent.

RESOLUTION

NOTE: In the following steps, the target attribute is designated as xxxx. The code sample causes the value of the xxxx attribute to flow from the metaverse to the Netscape directory.

To work around this issue:
  1. Use Compass to select the targeted MA.
  2. On the Actions menu, click Attribute Flow.
  3. Remove all of the existing attribute flow rules for the target attribute that appear as specific flow rules.
  4. Remove all of the existing attribute flow rules for the target attribute that appear as advanced flow script rules.
  5. For Metadirectory Services version 2.2 only, remove all of the existing attribute flow rules for the target attribute that appear as CD flow script rules.
  6. Enter the following code in the Advanced Attribute Flow script, but replace xxxx with the name of the target attribute.

    Note that this code includes comments that you can remove, if you want. Remember that the comments increase the overall size of the attribute.
    IF $EXIST($cd.xxxx) = T
    ###########################################################
    # The attribute existed in the connected directory the last 
    # time that a discovery was run.
    ###########################################################
    THEN
      IF $EXIST($mv.xxxx) = F
      #################################################
      # The metaverse value has been cleared, so send a 
      # null value to the connected directory.
      #################################################
      THEN
        $v_xxxx=-xxxx:
    	###################################################
    	# 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.
    	###################################################
        $cd.xxxx = $null
      ELSE
      ##########################################
      # Flow the phone number from the 
      # metaverse to the connected directory.
      ##########################################
      $v_xxxx = -xxxx: $mv.xxxx
      ENDIF
    ELSE
      ###################################################
      # The connected directory did not have the
      # attribute the last time that a discovery was run.
      ###################################################
      IF $EXIST($mv.xxxx) = T
      ########################################
      # Flow the value in the metaverse to the 
      # connected directory.
      ########################################
      THEN
        $v_xxxx=-xxxx: $mv.xxxx
      ENDIF
    ##########################################################
    # As a consequence, if there is no value in the metaverse 
    # and there was no pre-existing value in the connected 
    # directory, then do nothing.
    ##########################################################
    ENDIF
    					
  7. Click OK.
  8. Click the Design MA action.
  9. Click the Control Connected Directory tab, click the Output Templates tab, and then click the Modify tab.
  10. If the format statement for the ???? attribute exists, remove that format statement. Replace it with a statement that is similar to the following statement:

    ($v_????)

  11. Click OK.
  12. Perform this procedure for each attribute that you want to control in this way.

STATUS

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

Microsoft is researching this problem and will post more information in this article when the information becomes available.

MORE INFORMATION

The workaround in this article was tested on a Netscape Directory Server version 4.1-based computer and was proven effective.

Modification Type:MajorLast Reviewed:5/28/2003
Keywords:kbbug kbpending KB258741