web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Answered

When I do a select my numeric value have a dot as decimal

(0) ShareShare
ReportReport
Posted on by 1,875

Hi.

When I open a form  with a numeric value decimal comes with comma and thousands with dot like 1.000,03.

But when I do a select with X++ values shows differents, last example looks like 1000.03, what is the reason for this?Because I'm having problems with a export file.

Thanks for hepl.

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Javier,

    Can you indicate what coding you are using for the export? Note that the point is internally used within the AX logic. How it is presented on a form depends on user settings.

    Have also a look at the next page for some help on number formatting. msdn.microsoft.com/.../aa866120.aspx

  • XB Profile Picture
    1,875 on at

    Here's my code

    commaTextIo = new CommaTextIo(fileName, "w");

    while (qr.next())

    {

                   generalJournalEntry = qr.get(tableNum(generalJournalEntry));

                   generalJournalAccountEntry = qr.get(tableNum(generalJournalAccountEntry));

                   commaTextIo.write(generalJournalAccountEntry.LedgerAccount, generalJournalEntry.SubledgerVoucher, generalJournalAccountEntry.AccountingCurrencyAmount, generalJournalEntry.AccountingDate, generalJournalAccountEntry.text, generalJournalAccountEntry.TransactionCurrencyAmount, generalJournalAccountEntry.TransactionCurrencyCode);

    }

    AS you can see I'm not converting numeric to strings...I try with AsciiIo ,textIo event System.io.streamwriter...and I always have the same problem.

  • XB Profile Picture
    1,875 on at

    8764.1.png

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Javier,

    You can use the function num2str() to define the thousands and decimal separator. As mentioned the point is used within AX internally. If you don't specify the user preference in coding, it will not convert it as per your preferences.

  • XB Profile Picture
    1,875 on at

    The problem is that I don't wanna save as string, if I use num2str the value will be converted to string and it 'll show with quotes..

    Look at the first red column on images.

    8508.1.png

  • Israel Gonzalez Profile Picture
    733 on at

    Hi Javier,

    Did you check the regional configuration in your machine and the server?

  • XB Profile Picture
    1,875 on at

    Yeah, I check on Ax and machine on server, both have the same configuration "es", I checked language, keyboard..

  • Israel Gonzalez Profile Picture
    733 on at

    If you print CompanyInfo::find().LanguageId what do you see?

  • XB Profile Picture
    1,875 on at

    Hi Israel.

    I see "es", all config are in spanish.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Javier,

    Your initial question was tagged with "CSV". CSV is a text format. What exact class are you using for exporting the file?

    Have you also looked at Data Import/Export Framework?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans