HieService.openFromSource

Syntax

openFromSource (wbk, callback);

Parameters

wbk. Sets workbook value.

callback. Sets handler for operation execution end.

Description

The openFromSource method sends a request to open hierarchy of main time series database in the workbook.

Example

To execute the example, create a service for working with time series, named hieSrv (see HieService.getChildEls) and add the following code to the handler that processes document opening:

//Send request to open workbook hierarchy
// Create a service used to work with time series
tsService = new PP.TS.TSService({ Metabase: metabase });
// Open document
var wbk;
tsService.openDocument(RUB_KEY, onWbkOpened);
function onWbkOpened(sender, args)
{
	wbk = args.Workbook;
	//Send request to open hierarchy of main workbook factor catalog
	hieSrv.openFromSource (wbk, PP.Delegate(onFromSourceOpened, this));
	function onFromSourceOpened(){
	console.log("Hierarchy of main workbook factor catalog is open");
}
}

After executing the example a service for working with hierarchy of time series database is created. Hierarchy of the time series database with the 1334 key opens, and next the console shows an appropriate message. After opening the hierarchy of time series database a request is sent to open hierarchy of the workbook main time series database.  After this the console shows the following message: Hierarchy of the workbook main time series database is open.

See also:

HieService