Is there a way to limit decimal or round off values coming from API?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2023-10-19
02:39 PM
- last edited on
‎2024-09-17
01:21 PM
by
Doreena Deng
Hi,
As the subject suggests there is a need to limit the decimal of the property values that is coming from an API.
The decimal limited value should be rounded off to the specified decimal.
For example the property 'volume' of 'API_RailingBalusterQuantity' is giving a value of 7.1108929735418900e-05 or 0.0000711089297354189, but we would like that value to be rounded off to 4 decimal places.
The value should be '0.0001'.
Please help me on this.
Thanks & Regards
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2023-10-19 03:16 PM
I dont exactly understand the question.
The result of API_RailingBalusterQuantity() gets stored to local variable. After that you can round it as you desire using c/c++ functions/routines like round().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2023-10-19 03:16 PM
I dont exactly understand the question.
The result of API_RailingBalusterQuantity() gets stored to local variable. After that you can round it as you desire using c/c++ functions/routines like round().