TSService.getRubFromCube

Syntax

getRubFromCube (cubeKey, cubeName, callback);

Parameters

cubeKey. Sets cube key value.

cubeName. Sets cube name.

callback. Sets delegate to be executed after completing the request.

Description

The getRubFromCube method returns time series database from the cube with specified key.

Example

To execute the example the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). The repository must contain a cube with the 390857 key named Workbook with OLS.xls, that includes a child time series database, and the following code must be added in the document opening event handler:

	var getRubButt = new PP.Ui.Button({
		ParentNode: document.body, //DOM parent node
		Content: "Get Database from Cube", //Text      
		Click: PP.Delegate(onClickGetRub)     
	}); 
		
	function onClickGetRub()
	{
		var cubeKey = "390857";                  
		var cubeName = "Workbook with OLS.xls";
		//Get time series database from cube
		tsService.getRubFromCube(cubeKey, cubeName, PP.Delegate(onGetRubFromCube, this));
		//getRubFromCube method execution end event handler
		function onGetRubFromCube(sender, args){
			alert('RubKey: ' +  args.RubKey + '\n' + 'CubeKey: ' + args.CubeKey + '\n' + 'CubeName: ' + args.CubeName + '\n' + 'Args: ' + args.Args);
		}
	}

After executing the example a button named Get Database from Cube is placed on the HTML page. On clicking this button the user gets database with the specified key, and a message containing time series database key, cube key and cube name is shown.

See also:

TSService