Kap.JsBlock.getSource

Syntax

getSource ();

Description

The getSource method returns block data source.

Example

To execute the example the page must contain a dashboard designed named kapBox, and the currentBlock variable must be defined in the page. This variable must contain selected dashboard block (see Kap.KapBox). The BODY tag must contain a DIV element with the "but" identifier. Add a button clicking which will bring up a message with the key of data source for selected block:

var sourceButton = new PP.Ui.Button({
    ParentNode: "but",
    Content: "Data source key",
    Click: function () {
        alert("Data source key: " + currentBlock.getSource().getKey());
    }
});

After executing the example the Data Source Key button is placed in the page. Clicking this button brings up a message that contains key of the data source for selected dashboard block.

See also:

Kap.JsBlock