Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

Utility APIs

api.util Class

Utility definition for api class. Contains all utility-related API calls.

Methods

parseMDXExpression (formula escapeHTML) String

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

Parameters:

  • 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:

  • String

    This is the MDX formula parsed as a string.Example

Example:

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

Return Value: "Truck"