NumberFormatValidInfo ValidateFormatNumber(NumberFormatValidInfo NumberFormat)
NumberFormat. Parameters of checked custom format.
The ValidateFormatNumber operation checks if the specified custom format can be used in table cells.
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.
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.
{
"ValidateFormatNumber" :
{
"NumberFormat" :
{
"@F" : "# ##0,00"
}
}
}
{
"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: