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
- 4.2K All Categories
- 67 General
- 11 Training
- 202 Installation / Setup
- 1.1K Flows
- 106 Rules
- 262 Administration
- 212 Portal
- 490 General Q & A
- 695 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 52 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 179 Pages
- 5 Process Mining
- New Features
- 179 Datastructures
- 69 Repository
- 221 Integrations
- 28 Multi-Tenant
- 27 SDK
- 78 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 83 Lunch And Learn Questions