DashboardExpressionField GetDashboardExpressionField(string mon, DashboardExpressionField tArg)
mon. Moniker for working with calculated fact of information panel data source.
tArg. Calculated fact settings that should be obtained.
The GetDashboardExpressionField operation gets calculated fact settings 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!calculated fact key postfix, and in the tArg field specify empty values or default values for the fields, which values should be obtained. The moniker can be obtained on executing the OpenDashboard operation.
The operation results in the calculated fact settings.
Below is the example of getting calculated fact settings. The request contains calculated fact moniker and the list of settings, which values should be obtained. The response contains the obtained settings values.
{
"GetDashboardExpressionField" :
{
"mon" : "LKACHLFPHPFFGOAEFAJMIHOHCKLEPLKEEIENANDBMODOBJMH!M!S!PHOONDMFPHPFFGOAEGILOHDKLDDEDFAAEEJAAJAMKHGKPJBCK!Sources!1!Expressions!1",
"tArg" :
{
"k" : "1",
"n" : "",
"valid" : "false",
"customFormat" :
{
"format" : "",
"all" : "false"
},
"dataType" : "2147483647",
"expressionType" : "2147483647",
"calendarLevel" : "None",
"includeInSelection" : "false",
"calcMethod" : "BySelection",
"expression" : "",
"parentFieldId" : ""
}
}
}
{
"GetDashboardExpressionFieldResult" :
{
"k" : "1",
"id" : "CALCULATED FACT",
"n" : "Calculated value",
"valid" : "1",
"customFormat" :
{
"format" : "",
"all" : "0"
},
"dataType" : "8",
"expressionType" : "0",
"calendarLevel" : "Year",
"includeInSelection" : "0",
"calcMethod" : "BySelection",
"expression" : "@[FIELD 3]\/2",
"parentFieldId" : "FIELD 3"
}
}
public static DashboardExpressionField GetDashboardExpressionField(string moniker, uint sourceKey, uint calcFactKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetDashboardExpressionField()
{
tArg = new DashboardExpressionField()
{
calcMethod = new CubeCalcMethod(),
calendarLevel = new DimCalendarLvl(),
customFormat = new SemanticLayerCustomFormat()
{
all = new bool(),
format = string.Empty
},
dataType = int.MaxValue,
expression = string.Empty,
expressionType = int.MaxValue,
includeInSelection = new bool(),
k = calcFactKey,
n = string.Empty,
parentFieldId = string.Empty,
valid = new bool()
},
// Moniker for working with calculated fact
mon = moniker + "!Sources!" + sourceKey + "!Expressions!" + calcFactKey
};
// Get calculated fact settings
var result = somClient.GetDashboardExpressionField(tGet);
return result;
}
See also: