StartsWith (PQL)
Returns a subset of elements in a list based on a string search of captions using a 'starts with' operation.
- Returned Output: List
- Library: PQL \ Semantic \ String
- Version: 2018.00.000
- Compatibility: Pyramid Query Language (PQL) data sources
Syntax
* Click on the function's arguments above for more details on the input values.
Comments
- List parameter should be a list or set of elements from an existing hierarchy in the model.
- The search text string needs to be contained in quotation marks.
- For details on how to employ and use this function see the semantic calculation overview.
Different Function types
- To use a simple string manipulation operations, use the Common library function.
Also see Contains and EndsWith.
Examples
This method searches for strings starting with 'ne' and returns two states - New York and New Jersey:
StartsWith( {[Customer].[state].[New York], [Customer].[state].[New Jersey], [Customer].[state].[Maine]}, 'ne' )
This method searches for strings starting with 'ew' and returns no states:
StartsWith( {[Customer].[state].[New York], [Customer].[state].[New Jersey], [Customer].[state].[Maine]}, 'ew' )