Skip to main content


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

getContainerItemName(target, key, callback)

Updated on July 20, 2021

Obtains the name of the container item if a unique key is present in the container data.

Returns

The name of the container item as a string.

Parameters

NameTypeDescriptionRequired
targetstringThe target container whose data is searched.
keystringThe unique key that is searched for in the container data.
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 searches for the R-1234 key in the app/primary container and obtains the resulting container item’s name.

PCore.getContainerUtils().getContainerItemName('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