PP.App.setConfig

Syntax

setConfig(value: PP.AppConfig);

Parameters

Value. Application settings.

Description

The setConfig method sets the specified configuration settings for application.

Example

Executing the example requires that the Foresight Analytics Platform web application is opened. The scenario specified below must be started in the browser console.

Determine custom system parameter, set English language for the interface:

// Determine loaded settings
var result = PP.App.loadConfig();
if (result) {
    // Determine system configuration
    var config = PP.AppConfig;
    // Determine custom parameter
    config.MyParam = true;
    config.Modules = null;
    // Set new configuration settings
    PP.App.setConfig(config);
};
// Show custom parameter value
console.log("MyParam value: " + PP.AppConfig.MyParam);
// Set English language as the current culture
PP.App.setLocale({
    Locale: PP.CultureNames.en
});
// Determine current culture of the system
var locale = PP.App.getLocale();
console.log("System current language: " + locale);

After executing the example English language is set for the system interface. Value of custom parameter and code of the current language are displayed in the browser console:

MyParam value: true

System current language: en

See also:

PP.App