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
- 17 General
- 154 Installation / Setup
- 988 Flows
- 86 Rules
- 199 Administration
- 203 Portal
- 430 General Q & A
- 596 Forms
- 282 Reports
- 3 Designer Extensions
- 38 Example Flows
- 32 CSS Examples
- 1 Diagram Tile
- 5 Javascript Controls
- 137 Pages
- 1 Process Mining
- New Features
- 147 Datastructures
- 49 Repository
- 165 Integrations
- 25 Multi-Tenant
- 21 SDK
- 39 Modules
- 36 Settings
- 19 Active Directory
- 12 Version 7
- 34 Version 8