Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

Utility APIs

cv.api. util

Constructor

Name Description
new util()

Utility definition for cv.api class.

Methods

Name Description
parseMDXExpression(formula, escapeHTML) : string

Given an MDX formula, parseMDXExpression returns the last token in the formula. For example, [Product].[Trucks] would return 'Trucks'.

Constructor Details

new util()

Utility definition for cv.api class.

Source: javascript/scripts/cv_api_util.js, line 28

Methods Details

Since:
  • 5.4
parseMDXExpression(formula, escapeHTML) : string

Given an MDX formula, parseMDXExpression returns the last token in the formula. For example, [Product].[Trucks] would return 'Trucks'.

Source: javascript/scripts/cv_api_util.js, line 317

Parameters:
Name Default Value Summary
formula : string

This is the MDX formula to be parsed by the function.

escapeHTML : boolean

This is an optional parameter. If provided, the string parsed from the MDX expression will be returned with HTML reserved characters as escaped.

Returns:
Name Description
string

This is the MDX formula parsed as a string.

Example

cv.api.util.parseMDXExpression("[Product].[Truck]")

 // Return Value: "Truck"