SetDashboardExpressionFields

Syntax

bool SetDashboardExpressionFields(string mon, DashboardExpressionFields tArg)

Parameters

mon. Moniker for working with calculated facts of information panel data source.

tArg. Operation execution parameters.

Description

The SetDashboardExpressionFields operation changes settings of calculated facts list of information panel data source.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetDashboardExpressionFields xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">LKACHLFPHPFFGOAEFAJMIHOHCKLEPLKEEIENANDBMODOBJMH!M!S!PHOONDMFPHPFFGOAEGILOHDKLDDEDFAAEEJAAJAMKHGKPJBCK!Sources!1!Expressions</mon>
<tArg xmlns="">
<its>
<it>
  <k>1</k>
  <id>CALCULATED FACT</id>
  <n>Calculated value</n>
  <valid>true</valid>
  <calendarLevel>Year</calendarLevel>
  <calcMethod>BySelection</calcMethod>
  <expression>@[FIELD 3]/2</expression>
  </it>
  </its>
  </tArg>
  </SetDashboardExpressionFields>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetDashboardExpressionFieldsResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</SetDashboardExpressionFieldsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"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"
}
]
}
}
}
}

JSON response:

{
"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:

Working with Information Panels