Administering an Encyclopedia volume : Defining the data on which an operation acts : Defining data using Search
 
Defining data using Search
To limit the scope of an operation to specific data, use the Search element to indicate which data the operation affects. The following request deletes all notification groups to which Carl Benning belongs:
<SOAP-ENV:Body>
<Administrate>
<AdminOperation>
<DeleteGroup>
<Search>
<WithUserName>Carl Benning</WithUserName>
</Search>
</DeleteGroup>
</AdminOperation>
</Administrate>
</SOAP-ENV:Body>
You cannot delete all items that match a condition by using the wildcard asterisk (*). For example, the following element results in an error message:
<WithUserName>*</WithUserName>
To delete all items that match a condition, you must list them all.
You can use Search to streamline update and delete requests. For example, to assign UserB the same roles as UserA, use a single UpdateRole operation. First, update the security role by adding UserB, then run a search for UserA in the same request.
<SOAP-ENV:Body>
<Administrate>
<AdminOperation>
<UpdateRole>
<UpdateRoleOperationGroup>
<UpdateRoleOperation>
<AssignedToUsersByName>
<String>UserB</String>
</AssignedToUsersByName>
</UpdateRoleOperation>
<Search>
<UserName>UserA</UserName>
</Search>
</UpdateRoleOperationGroup>
</UpdateRole>
</AdminOperation>
</Administrate>
</SOAP-ENV:Body>