bool SetDashboardExpressionFields(string mon, DashboardExpressionFields tArg)
mon. Moniker for working with calculated facts of information panel data source.
tArg. Operation execution parameters.
The SetDashboardExpressionFields operation changes settings of calculated facts list of information panel data source.
To execute the operation, in the mon field specify moniker of opened information panel instance with the !Sources!data source key!Expressions postfix, and in the tArg field specify settings of the collection of calculated facts. The moniker can be obtained on executing the OpenDashboard operation.
The operation results in the logical True if the settings were changed successfully.
Below is the example of changing settings of the list of calculated facts. The request contains the moniker for working with calculated facts and the list of calculated facts with settings. The response contains whether changes were applied successfully.
{
"SetDashboardExpressionFields" :
{
"mon" : "LKACHLFPHPFFGOAEFAJMIHOHCKLEPLKEEIENANDBMODOBJMH!M!S!PHOONDMFPHPFFGOAEGILOHDKLDDEDFAAEEJAAJAMKHGKPJBCK!Sources!1!Expressions",
"tArg" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"id" : "CALCULATED FACT",
"n" : "Calculated value",
"valid" : "true",
"calendarLevel" : "Year",
"calcMethod" : "BySelection",
"expression" : "@[FIELD 3]\/2"
}
]
}
}
}
}
{
"SetDashboardExpressionFieldsResult" : "1"
}
public static bool SetDashboardExpressionFields(string moniker, uint sourceKey, DashboardExpressionField[] calcFields)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetDashboardExpressionFields()
{
tArg = new DashboardExpressionFields()
{
its = calcFields
},
// Moniker for working with calculated facts
mon = moniker + "!Sources!" + sourceKey + "!Expressions"
};
// Change the list of calculated facts
var result = somClient.SetDashboardExpressionFields(tSet);
return result;
}
See also: