Way to truncate to specific amount of digits?
Comments
-
Is there a way to round numbers to a certain number of places in decisions as well as truncating the result to a certain number of digits?
-
We have a system flow called "set decimal places on number". You wont need to convert it to a string, you can pass a decimal into a string directly with no issue, but if need it to output as a decimal you could use the system flow "convert string to decimal" and that should do the trick of truncating the number to a certain number of digits. However, this step itself does not round mathematically, so you will need a "round" step beforehand. The attached image shows an example of this:
Relevant Links:[url=https://documentation.decisions.com/v8/docs/en/using-converter-flows?highlight=set decimal places]https://documentation.decisions.com/v8/docs/en/using-converter-flows?highlight=set decimal places[/url]
[i]edited by kobe.lee@decisions.com on 7/21/2023[/i]
Howdy, Stranger!
Categories
- 2.1K All Categories
- 18 General
- 155 Installation / Setup
- 991 Flows
- 86 Rules
- 203 Administration
- 204 Portal
- 433 General Q & A
- 600 Forms
- 282 Reports
- 3 Designer Extensions
- 38 Example Flows
- 32 CSS Examples
- 1 Diagram Tile
- 5 Javascript Controls
- 139 Pages
- 1 Process Mining
- New Features
- 150 Datastructures
- 50 Repository
- 169 Integrations
- 25 Multi-Tenant
- 21 SDK
- 40 Modules
- 38 Settings
- 20 Active Directory
- 12 Version 7
- 34 Version 8