ecm:round
- 1 Minute to read
- Print
- DarkLight
ecm:round
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
The function ecm:round rounds the target number up to a value determined by the specified number of fractional digits. The value returned is an integer data type.
Example
An external application regularly updates the prices of items in a product catalog. The application calculates currency conversions to values with four decimal places. These values are imported into an unlinked related data set named Products.
Prices from this data set are inserted into a message, rounding the number to two decimal places. The expression is constructed as follows:
<%${ecm:round((ecx:related('Products',user.CustomAttribute['ProductID_2'])['Price'],2)}%>
Structure
ecm:round(number, integer)
Parameters
Parameter | Description |
---|---|
number | Specifies the target value to be rounded. |
integer | Specifies the number of fractional digits to be included in the result. |
Was this article helpful?