Returns the captions of the member elements in a data point or cell from a query result set.
- Returned Output: Text List
- Library: PQL \ Action \ Jump
- Version: 2018.00.000
- Compatibility: Any content (regardless of data source) in the relevant parts of the application
* Click on the function's arguments above for more details on the input values.
- The captions function returns a list of all the captions generated from all the members used in the action trigger.
- The optional hierarchy list provides a way to filter out irrelevant hierarchies from the caption generator.
- The optional delimiter provides a convenient way to delimit the caption strings provided.
The examples below use the following example grid and action.
A "jump to URL" action was defined to run from the data points or cells of this query. When triggered by the end user through the right-click context menu, the application will take the user to a site called "mysite.com" and append the captions of the cell coordinates to the URL that loads the site. This in turn allows the site to react to the coordinates and potentially show different sets of relevant data.
In this case, the URL that would load up would be "http://mysite.com/Adihash,Clothing,Bachelors" - since these are the member coordinates that describe the highlighted cell below. The receiving page might then have some programmed logic to read the coordinates and potentially show data for Adihash, Clothing and Bachelors.
This example returns "http://mysite.com/Adihash" because the optional hierarchy list has been provided with just "manufacturer". This limits the captions returned to just manufacturer. The dataset function is used to build a list of objects:
"http://mysite.com/" + captions(dataset("[manufacturers].[Manufacturer]"))
This example returns "http://mysite.com/Adihash&Bachelors" because the optional hierarchy list has been provided with "manufacturer" and "education" - filtering out products. The resulting list is also delimited using the ampersand character instead of the default commas:
"http://mysite.com/" + captions(dataset("[manufacturers].[Manufacturer]", "[customerProfile].[Education]"),"&")