Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

issue with decimals display

(0) ShareShare
ReportReport
Posted on by 1,293

Hi,

if my price values comes as 0.93199... then its supposed to display s 0.932.

which X++ function works best to code this?

Lakshmi

  • Sherwin Profile Picture
    Sherwin 220 on at
    RE: issue with decimals display

    Please check below tech link.

    docs.microsoft.com/.../xpp-math-run-time-functions

  • Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: issue with decimals display

    Hello Lakshmi,

    Why is it that you are looking for a function to round and why can't you go along with the standard rounding functionality that we have available in AX2012?

    Best regards,

    Ludwig

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: issue with decimals display

    Hi  Lakshmi,

    You can use round(value,0.001),Then it will get four decimal places.

    After that through Global :: real2double (), you will be able to get the correct value.

    My example:

    3007.PNG

  • Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,091 on at
    RE: issue with decimals display

    Hi Lakshmi,

    There was a dot in the end of URL. Try it one more time, it should work.

  • Lakshmi Karambakkam Profile Picture
    Lakshmi Karambakkam 1,293 on at
    RE: issue with decimals display

    I am looking for function to round the value. the link no longer exists.

  • Suggested answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,091 on at
    RE: issue with decimals display

    Hi Lakshmi,

    Do you want to round values during display or you just want to round it when you assign the field?

    If you want to round it in x++ there is a couple of functions to do rounding dynamics-ax-live.blogspot.com/.../how-to-round-numbers.html

    If you want just change how to display number, there is ther property on EDT or form control - NoOfDecimals.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans