ValidateFormatNumber

Syntax

NumberFormatValidInfo ValidateFormatNumber(NumberFormatValidInfo NumberFormat)

Parameters

NumberFormat. Parameters of checked custom format.

Description

The ValidateFormatNumber operation checks if the specified custom format can be used in table cells.

Comments

To execute the operation, in the NumberFormat.F field set the format to be checked.

After the check as a result of operation execution, the NumberFormat.Valid field indicates whether the specified format can be used.

Example

Below is the example of checking custom format. The request contains the format. The response contains the information about the format with the possibility of its use.

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">
<ValidateFormatNumber xmlns="http://www.fsight.ru/PP.SOM.Som">
  <NumberFormat F="# ##0,00" xmlns="" />
  </ValidateFormatNumber>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ValidateFormatNumberResult 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" F="# ##0 00" FT="-1">
  <Valid xmlns="">1</Valid>
  </ValidateFormatNumberResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"ValidateFormatNumber" :
{
"NumberFormat" :
{
"@F" : "# ##0,00"
}
}
}

JSON response:

{
"ValidateFormatNumberResult" :
{
"@F" : "# ##0 00",
"@FT" : "-1",
"Valid" : "1"
}
}
public static NumberFormatValidInfo ValidateFormatNumber(string format)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tVal = new ValidateFormatNumber()
{
NumberFormat = new NumberFormatValidInfo()
{
F = format,
}
};
// Check format
var result = somClient.ValidateFormatNumber(tVal);
return result;
}

See also:

Table