- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2021 02:34 PM
I have this code in the server side , it is giving the result as 44.0 I want only 44
current.variables.sds_price = parseInt(current.cmdb_ci.market_value)/1024;
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2021 06:49 AM
Please check sample examples from below link , give a try . let me know if it's still not working.
https://stackoverflow.com/questions/7641818/how-can-i-remove-the-decimal-part-from-javascript-number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2021 07:57 AM
Hi there,
Could you please let us know the 'type' of the 'market_value' column on the 'cmdb_ci' table?
- In the App Nav type 'cmdb_ci.config'
- In the 'Dictionary Entries' tab, search for the Column name 'market_value'
- What 'type' is that column?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2021 08:29 AM
Thanks Every one , I Fixed this by setting
num = num.toFixed(0);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2021 08:42 AM
Nice. Just be aware that number will be a string!