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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

ERROR An invalid field or attribute has been specified for the 'Format' property.

(0) ShareShare
ReportReport
Posted on by 307

I got an error when i format the number for the report

An invalid field or attribute has been specified for the 'Format' property.

pastedimage1681966081942v1.png

   gTotalRequestAmount := format(1000002, 15, '<Sign><Decimals>');
---------------
 gTotalRequestAmount: Text;
Could you please share your experience on this error ?
  • Suggested answer
    NAV_with_Narang Profile Picture
    2,410 Moderator on at

    If your aim is to convert integer/decimal into a text, just use:

    Text := FORMAT(Integer);

  • Suggested answer
    ShanAbeywicrema Profile Picture
    954 on at

    What do you need to achieve. if you use this format string you can specify decimal value. such as 1000002.25

    it should be gTotalRequestAmount := FORMAT(1000002.5, 15, '<Sign><Decimals>');

    if you don't have decimal use something like this

    gTotalRequestAmount := FORMAT(1000002, 15, '<Sign><Integer>');

    get idea from following resources

    learn.microsoft.com/.../format-function--code--text-

    learn.microsoft.com/.../format-property

  • Hoang Ng Profile Picture
    307 on at

    Thanks Shan, Narang

    I want to format Amount with thousand separator. I tried to change parameter value in FORMAT but not successful

    gTotalRequestAmount := FORMAT("Purchase Header"."Amount Including VAT", 0, '<Sign><Integer Thousand><Decimals>')

    Thanks.

  • Suggested answer
    ShanAbeywicrema Profile Picture
    954 on at

    You can use following syntax, it's simple. But your code also working for me. what is the issue you got?

     gTotalRequestAmount := FORMAT(555777.85,15,3);

    pastedimage1681973282843v1.png

    I got same output in BC

    pastedimage1681973646136v1.png

     gTotalRequestAmount := FORMAT("Purchase Header"."Amount Including VAT",15,3);


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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 768 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 541 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 324 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans