C.8.9.3.12. select-first-object

Selects the first object matching given criteria. Searches only non-ambiguous objects given the initial selection.

<select-first-object
    type="group_name"
    state="{any | stateless | fully-defined | under-defined | suppressed | 
       not-updated | updated | obsolete | error | bad-license
}"
    name-regexp="regular_expression" />

Note:  It was necessary to "word wrap" the long line of code in the above example.


Attributes

type

Optional. Identifies an object group name or an object type constant as a search criterion. If omitted, the object type is not considered.

Object groups are defined by using the object-group element. Refer to the Standard Object Groups Reference.

Type constants for specific objects (prefixed by "id_") are defined in the script file DSConstants.js.

state

Optional. Specifies an object state as a search criteria. If omitted, the default of "any" is used, meaning that object state is not considered.

States are defined in the script file DSConstants.js.

name-regexp

Optional. Specifies a regular expression of an object's name as a search criterion. For example, "part" matches any object that includes "part" in its name (for example, "part 2"). If omitted, object names are not considered. See the Microsoft regular expressions reference .

Element Information
Parents activate-event, if, and, or, not, then, else
Children None
End Tag No - close element with "/>"
Return Value True if one object meeting the criteria was selected.
See Also

select-all-objects.