Returns the absolute value of the number represented in decimal.
An error occurs if number is not a valid number.
abs(number)
Parameter | Type | Description |
---|---|---|
number | Decimal number | Any decimal number. |
A string containing the absolute of the number, or an empty string if an error occurs.
In this example, the result of abs is "2341.23".
<field sid="absTest">
<label>Test abs()</label>
<format>
<datatype>string</datatype>
<constraints>
<mandatory>on</mandatory>
</constraints>
</format>
<value compute="abs('-2341.23')"></value>
</field>