Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

isContainerItemExists(target, key, callback)

Updated on July 20, 2021

Verifies if a specific item exists in a container.

Returns

The Boolean value true if the item exists in a container.

Parameters

NameTypeDescriptionRequired
targetstringThe target container to be verified.
keystringThe unique key of the container item to be searched for.
callbackContainerCallbackThe function executed for each unique key in the container item till it returns true, indicating that the key has been found.
Note: If this parameter is not defined, a strict comparison is used to find the key.

Usage example

In this example, the API verifies if the container item with the R-1234 key exists in the app/primary container.

PCore.getContainerUtils().isContainerItemExists('app/primary', 'R-1234');

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us