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 175

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>') + ' :المجموع ';
  • Suggested answer
    YUN ZHU Profile Picture
    62,477 Moderator on at
    RE: How to convert decimal to text field in business central

    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

  • Suggested answer
    TeddyH Profile Picture
    12,775 Moderator on at
    RE: How to convert decimal to text field in business central

    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
    Inge M. Bruvik Profile Picture
    32,718 Moderator on at
    RE: How to convert decimal to text field in business central

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

    And if so, have you run calcfileds  ?

  • Abd Alsameea Nat Profile Picture
    175 on at
    RE: How to convert decimal to text field in business central

    Hi NorthW,

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

  • Suggested answer
    Inge M. Bruvik Profile Picture
    32,718 Moderator on at
    RE: How to convert decimal to text field in business central

    I would try the standard format 9.

    format(Amount,9)

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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard > Small and medium business | Business Central, NAV, RMS

Featured topics

Product updates

Dynamics 365 release plans