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 format quantity

(0) ShareShare
ReportReport
Posted on by 131
Hello community, first of all thank you very much for reading my question and taking the time.

I currently have a decimal type variable and I want to give it the following format: 0000000000000.01

Example if my variable brings the amount 1678.32 it would have to be displayed in my text type variable as follows:
00000000001678.32

currently try something like this:
pastedimage1675869008021v1.png

But I can't get the expected result, I get something like this:
'39088.0000000000000'


and it should look something like this:
0000000039088.00

Thank you for your time and I remain attentive to any kind of idea. Thank you and have a good day.


 
I have the same question (0)
  • Yael Suarez Profile Picture
    131 on at

    Hi I use this:

    PBAMonto := Format(PBATbDiarioPagos.Amount, 0, '<Precision,2:2><Filler Character,0><Integer,13><Filler Character,0><Decimals>');

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    www.dynamicsuser.net/.../14

    I will open this up to the community in case they have something to add.

    Thanks.

  • Suggested answer
    Nitin Verma Profile Picture
    21,708 Moderator on at

    Hi,

    You can try something like this, I am giving you idea, you can write your own logic with the help of below methods and variables.

    length: Integer

    Amt: Text

    length := 8;

    Amt := '39088.00';

    MESSAGE('%1%2',PADSTR('',8,'0'),Amt);

    Answer is - 0000000039088.00

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 2,917

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,025 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans