IBMCM_SearchItem

Searches for the existing item in the IBM® Content Manager repository.

Syntax

bool IBMCM_SearchItem (string attribute, string attributeValue)

Parameters

String attribute: the attribute name.

String attributeValue: the unique attribute value or folder ID.

Parameters

Both attribute and attributeValue are required parameters. If folder ID is used in the second parameter, leave the first parameter empty ("").

Smart parameters are supported.

Returns

True, if the item is found. Otherwise, False.

Level

All levels.

Details

Searches for the existing item in the IBM Content Manager repository that matches the specified attribute and value. If an item is found, the current item is set to it. Otherwise the current item is set to NULL.

IBMCM_SearchItem is used to retrieve an existing IBM Content Manager item before calling other actions such as IBMCM_AddPages, IBMCM_DeletePages, IBMCM_ReplacePage, and IBMCM_SetAttributeValue to update the attributes of the item or the contents of the item.

Example
IBMCM_ SearchItem("Department", "Human Resource")
IBMCM_SetAttributeValue("Department","Operations")

This example searches for an item with the attribute name Department and the attribute value Human Resources. It then changes the attribute value to Operations.

IBMCM_ SearchItem ("", "A1001001A14B04B12546D00215")

This example searches for an item with the ID equal to A1001001A14B04B12546D00215.