Microsoft KB Archive/253528

= Using the $Search Function in a Management Agent of Microsoft Metadirectory Services =

Article ID: 253528

Article Last Modified on 11/1/2006

-

APPLIES TO


 * Microsoft Metadirectory Services 2.1

-



This article was previously published under Q253528



SYMPTOMS
Prior to Microsoft Metadirectory Services 2.1 when the metascript $Search function performed a search and found zero or multiple matches, it would return a null value. This mechanism was unsatisfactory in situations where you needed to determine the uniqueness of an entry based on a search criterion.



CAUSE
The $search function would return a NULL value if more than one entry was located by the search. A new argument, returnArbitraryResponse, was added to signal the fact that more than one entry was located. This now provides a means to determine the uniqueness of entries matching a particular search criterion.



RESOLUTION
To resolve this issue, this $search functionality was modified in MMS 2.1. Upgrade to Microsoft Metadirectory Services 2.1 to receive this modification.



MORE INFORMATION
The $search function has been modified. The new syntax to this function is:

$search(whatToSearch, scope, base, returnArbitraryResponse)

Where returnArbitraryResponse is optional and has a default value of NULL for backward compatibility. If returnArbitraryResponse is set to "arbitrary", the $search function returns an arbitrary set of search results when multiple responses are found; it will no longer return a NULL. Management Agent developers can then use this argument to signal that more than one match was found, and that the entry being searched for is not unique.

No changes are required for existing templates if you do not require this functionality.

Additional query words: Importt, Management Agents, Agent Functions, MMS

Keywords: kbprb KB253528

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.