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.1K All Categories
- 60 General
- 11 Training
- 201 Installation / Setup
- 1.1K Flows
- 106 Rules
- 260 Administration
- 212 Portal
- 489 General Q & A
- 693 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 51 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 178 Pages
- 5 Process Mining
- New Features
- 178 Datastructures
- 69 Repository
- 219 Integrations
- 28 Multi-Tenant
- 27 SDK
- 76 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 66 Lunch And Learn Questions