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. It is also possible to set format type in the NumberFormat.FT field.

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 FT="1" 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",
"@FT" : "1"
}
}
}

JSON response:

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

See also:

Interactive Visual Components