GetNumberFormatValues

Syntax

NumberFormatValuesData GetNumberFormatValues(NumberFormatValuesArg tArg)

Parameters

tArg. Operation execution parameters.

Description

The GetNumberFormatValues method formats values in accordance with the specified format.

Comments

To execute the operation, in the tArg.format field specify the required number format, and in the tArg.items field specify formatted values.

The operation results in the collection of formatted values.

Example

Below is the example of formatted numbers. The request contains format and numbers. The response contains formatted numbers.

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">
<GetNumberFormatValues xmlns="http://www.fsight.ru/PP.SOM.Som">
<tArg xmlns="">
<items>
  <it>123,456</it>
  <it>123456789,012345</it>
  </items>
  <format F="#,##0.000" UDS="." FTS=" " />
  </tArg>
  </GetNumberFormatValues>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetNumberFormatValuesResult 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">
<items xmlns="">
  <it>123.456</it>
  <it>123 456 789.012</it>
  </items>
  </GetNumberFormatValuesResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetNumberFormatValues" :
{
"tArg" :
{
"items" :
{
"it" :
[
"123,456",
"123456789,012345"
]
},
"format" :
{
"@F" : "#,##0.000",
"@UDS" : ".",
"@FTS" : " "
}
}
}
}

JSON response:

{
"GetNumberFormatValuesResult" :
{
"items" :
{
"it" :
[
"123.456",
"123 456 789.012"
]
}
}
}
public static NumberFormatValuesData GetNumberFormatValues(string[] arguments)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tFormat = new GetNumberFormatValues()
{
tArg = new NumberFormatValuesArg()
{
format = new TabNumberFormatStyle()
{
F = "#,##0.000",
UDS = ".",
FTS = " "
},
items = arguments
}
};
// Format numbers
var result = somClient.GetNumberFormatValues(tFormat);
return result;
}

See also:

Table: Operations