TabValidateFormula

Syntax

bool TabValidateFormula(TabSheetId tTabSheet, string formula)

Parameters

tTabSheet. Table moniker.

formula. Expression that must be checked whether it can be used on conditional format.

Description

The TabValidateFormula operation checks expression used in conditional format.

Comments

To execute the operation, in the tTabSheet field specify table moniker and in the formula field specify checked expression. The moniker can be based on the moniker of opened object instance, the table of which is worked with, following the rules:

The result of operation execution is the true logical, if the expression is available for conditional format and the false logical, if the expression is incorrect.

Example

Below is the example checking whether it is possible to use the expression in conditional format. The request contains table moniker and expression. The response contains the attribute indicating that the expression is correct for conditional format.

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">
<TabValidateFormula xmlns="http://www.fsight.ru/PP.SOM.Som">
<tTabSheet xmlns="">
  <id>PIHBEDBNELDPFOAEFEDCEMJBFINKCAOEMIHGHJAAHDLLJOHF!M!S!PLFPLFNBNELDPFOAEFCLGLLHBNEKHIFKEJIADGEJBNAOOBCCB!1</id>
  </tTabSheet>
  <formula xmlns="">Value>(A1+B1)*C1</formula>
  </TabValidateFormula>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <TabValidateFormulaResult 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</TabValidateFormulaResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"TabValidateFormula" :
{
"tTabSheet" :
{
"id" : "PIHBEDBNELDPFOAEFEDCEMJBFINKCAOEMIHGHJAAHDLLJOHF!M!S!PLFPLFNBNELDPFOAEFCLGLLHBNEKHIFKEJIADGEJBNAOOBCCB!1"
},
"formula" : "Value>(A1+B1)*C1"
}
}

JSON response:

{
"TabValidateFormulaResult" : "1"
}
public static bool ValidateFormula(string moniker, string formula)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tVal = new TabValidateFormula()
{
formula = formula,
tTabSheet = new TabSheetId() { id = moniker }
};
// Check format
var result = somClient.TabValidateFormula(tVal);
return result;
}

See also:

Table