CrossDatabaseMappingsDialog.RequestMetadata

Syntax

RequestMetadata(sender: Object, args: PP.Mb.Ui.PropertyChangedEventArgs);

Parameters

sender. Event source.

args. Event information. The parameter contains an object of the PP.Mb.Ui.PropertyChangedEventArgs type, in which the Metadata property contains the RubKey key that is a key of master time series database.

Description

The RequestMetadata event occurs when there is no metadata in the source for workbook attributes mapping dialog.

Example

To execute the example, the HTML page must contain the CrossDatabaseMappingsDialog component named crossDatabaseMappingsDialog (see Example of Creating the CrossDatabaseMappingsDialog Component), and a time series database with the 3014 key must be available in addition to the current one. Process the RequestMetadata event and replace the current master time series database with the database under the 3014 key:

// Process the RequestMetadata event
crossDatabaseMappingsDialog.RequestMetadata.add(function (sender, args) {
    console.log("Master database key: " + args.getMetadata().RubKey);
});
// Set a database with the 3014 key as a master one
var state = {
    comparatorRubKey: 3014
};
// Determine new settings for the dialog
crossDatabaseMappingsDialog.setCurrentState(state);

After executing the example the time series database with the 3014 key is set as the master database in the browser console. The RequstMetadata event is fired, and after processing this event the browser console displays key of the new master database:

Key of the master database: 3014

See also:

CrossDatabaseMappingsDialog