DashboardExpressionFieldsAdd

Syntax

ItEntityEx DashboardExpressionFieldsAdd(string mon, DashboardExpressionField tArg)

Parameters

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

tArg. Operation execution parameters.

Description

The DashboardExpressionFieldsAdd operation adds a calculated fact for 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.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.

Example

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.

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">
<DashboardExpressionFieldsAdd xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">LKACHLFPHPFFGOAEFAJMIHOHCKLEPLKEEIENANDBMODOBJMH!M!S!PHOONDMFPHPFFGOAEGILOHDKLDDEDFAAEEJAAJAMKHGKPJBCK!Sources!1!Expressions</mon>
<tArg xmlns="">
  <k>-1</k>
  </tArg>
  </DashboardExpressionFieldsAdd>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<DashboardExpressionFieldsAddResult 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">
  <k xmlns="">1</k>
  <id xmlns="">CALCULATED FACT</id>
  <n xmlns="">Calculated fact</n>
  </DashboardExpressionFieldsAddResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"DashboardExpressionFieldsAdd" :
{
"mon" : "LKACHLFPHPFFGOAEFAJMIHOHCKLEPLKEEIENANDBMODOBJMH!M!S!PHOONDMFPHPFFGOAEGILOHDKLDDEDFAAEEJAAJAMKHGKPJBCK!Sources!1!Expressions",
"tArg" :
{
"k" : "-1"
}
}
}

JSON response:

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

Working with Information Panels