Workbook.ActiveRub

Syntax

ActiveRub: Number;

Description

The ActiveRub property sets key of the active time series database for workbook data model.

Comments

Use JSON or the setActiveRub method to set the property value and the getActiveRub method to get the property value.

Example

To execute the example, the HTML page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). Determine key of the active time series database, set this key for workbook data model and output to the browser console:

// Get workbook data model
var workbook = workbookBox.getSource().getActiveSheet();
// Get moniker of active time series database and get key from it
var odIdArr = workbook.getRub().id.id.split("!");
var key = odIdArr[odIdArr.length - 1];
// Set key of active time series database
var activeRub = workbook.setActiveRub(key);
console.log("Key of active time series database: " + workbook.getActiveRub());

After executing the example key of the active time series database is set for the workbook data model. This key is also displayed in the browser console:

Key of the active time series database: 2031

See also:

Workbook