DashboardExpressionFields GetDashboardExpressionFields(string mon, DashboardExpressionFields tArg)
mon. Moniker for working with calculated facts of information panel data source.
tArg. Operation execution parameters.
The GetDashboardExpressionFields operation gets a list of calculated facts 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 empty values or default values of the fields, which values should be obtained. Specify one element for collections. The moniker can be obtained on executing the OpenDashboard operation.
The operation results in the obtained information about calculated facts.
Below is the example of getting a list of calculated facts and their settings. The request contains moniker for working with calculated facts and a list of settings, which values should be obtained. The response contains the obtained settings.
{
"GetDashboardExpressionFields" :
{
"mon" : "LKACHLFPHPFFGOAEFAJMIHOHCKLEPLKEEIENANDBMODOBJMH!M!S!PHOONDMFPHPFFGOAEGILOHDKLDDEDFAAEEJAAJAMKHGKPJBCK!Sources!1!Expressions",
"tArg" :
{
"its" :
{
"it" :
[
{
"k" : "-1",
"id" : "",
"n" : "",
"valid" : "false",
"calendarLevel" : "None",
"calcMethod" : "BySelection",
"expression" : ""
}
]
}
}
}
}
{
"GetDashboardExpressionFieldsResult" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"id" : "CALCULATED FACT",
"n" : "Calculated value",
"valid" : "1",
"calendarLevel" : "Year",
"calcMethod" : "BySelection",
"expression" : "@[FIELD 3]\/2"
}
]
}
}
}
public static DashboardExpressionFields GetDashboardExpressionFields(string moniker, uint sourceKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetDashboardExpressionFields()
{
tArg = new DashboardExpressionFields()
{
its = new DashboardExpressionField[]
{
new DashboardExpressionField()
{
k = uint.MaxValue,
id = string.Empty,
n = string.Empty,
calcMethod = new CubeCalcMethod(),
calendarLevel = new DimCalendarLvl(),
expression = string.Empty,
valid = new bool()
}
}
},
// Moniker for working with calculated facts
mon = moniker + "!Sources!" + sourceKey + "!Expressions"
};
// Get the list of calculated facts
var result = somClient.GetDashboardExpressionFields(tGet);
return result;
}
See also: