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

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

(0) ShareShare
ReportReport
Posted on by 297

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 ?
I have the same question (0)
  • Suggested answer
    NAV_with_Narang Profile Picture
    2,294 Moderator on at

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

    Text := FORMAT(Integer);

  • Suggested answer
    ShanAbeywicrema Profile Picture
    948 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
    297 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
    948 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

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,229

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans