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 :
Small and medium business | Business Central, N...
Suggested Answer

How to convert decimal to text field in business central

(0) ShareShare
ReportReport
Posted on by 181

Hi All,

How to convert decimal to text field in business central, I tried this code ( FORMAT() ) but the result appear (0.00) in QR Code.

BarcodeString := "No." + 'رقم الفاتورة: ' +
                 "VAT Registration No." + ' :الرقم الضريبي' +
                 FORMAT("Due Date") + ' :تاريخ طباعة ' +
                 FORMAT(TotalSubTotal) + 'Total' +
                 FORMAT("Amount Including VAT", 0, '<Precision,2:2><Standard Format,0>') + ' :المجموع ';
I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    I would try the standard format 9.

    format(Amount,9)

  • Abd Alsameea Nat Profile Picture
    181 on at

    Hi NorthW,

    Thank you for response,I tried this code But the result is zero.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    Is it a flowfield you are getting the decimal value from?

    And if so, have you run calcfileds  ?

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at

    Check your "Amount Including VAT" if it is a value or a flowfield.

    If it is a flowfield, you need to call calcfields beforehand.

    CALCFIELDS("Amount Including VAT");

  • Suggested answer
    YUN ZHU Profile Picture
    95,550 Super User 2025 Season 2 on at

    Hi, As mentioned above, the "Amount Including VAT" field in the SalesHeader table is FlowField.

    pastedimage1639013590056v1.png

    When you read its value in a report, you need to use Record.CalcFields(Any [, Any,...]) Method or Record.SetAutoCalcFields([Any,...]) Method.

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-calcfields-method

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-setautocalcfields-method

    Hope this will help.

    Thanks.

    ZHU

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,151

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,443 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,092 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans