ItEntityEx DashboardExpressionFieldsAdd(string mon, DashboardExpressionField tArg)
mon. Moniker for working with calculated facts of information panel data source.
tArg. Operation execution parameters.
The DashboardExpressionFieldsAdd operation adds a calculated fact for 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.k field specify default value. The moniker can be obtained on executing the OpenDashboard operation.
The operation results in the basic information about the created calculated fact.
Further work with the calculated fact is executed using the GetDashboardExpressionField and SetDashboardExpressionField operations. To delete the calculated fact, use the DashboardExpressionFieldsDelete operation.
Below is the example of creating a new calculated fact of information panel data source. The request contains moniker of information panel data source. The response contains basic information about the created calculated fact.
{
"DashboardExpressionFieldsAdd" :
{
"mon" : "LKACHLFPHPFFGOAEFAJMIHOHCKLEPLKEEIENANDBMODOBJMH!M!S!PHOONDMFPHPFFGOAEGILOHDKLDDEDFAAEEJAAJAMKHGKPJBCK!Sources!1!Expressions",
"tArg" :
{
"k" : "-1"
}
}
}
{
"DashboardExpressionFieldsAddResult" :
{
"k" : "1",
"id" : "CALCULATED FACT",
"n" : "Calculated fact"
}
}
public static ItEntityEx DashboardExpressionFieldsAdd(string moniker, uint sourceKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tAdd = new DashboardExpressionFieldsAdd()
{
tArg = new DashboardExpressionField()
{
k = uint.MaxValue
},
// Moniker for working with calculated facts
mon = moniker + "!Sources!" + sourceKey + "!Expressions"
};
// Create a calculated fact
var result = somClient.DashboardExpressionFieldsAdd(tAdd);
return result;
}
See also: