HasItem

Checks an individual string items can be found in a collection of strings.

  • Returned Output: Boolean
  • Library: PQL \ Common \ String
  • Version: 2018.00.000
  • Compatibility:
    • Can be combined with and other PQL function throughout the application.
    • It CANNOT be used with MDX or VBA functions. But it can be used on MDX-based content in other parts of the application.

Syntax

HasItem( <Text List> , <Text> )

* Click on the function's arguments above for more details on the input values.

Comments
  • The text string collection needs to a typed array or list of strings.
  • The text string item can be any alphanumeric set of characters.
  • The function returns true f the collection contains the item. Otherwise false.

Examples

This example uses the UserRolesSet function to return a collection of the role names for the currently logged in user.

HasItem(UserRolesSet(), "Role A")

If user domain\jsmith is in Role A, Role B, and Role C, the above function will return true.