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...
Answered

AL: Right alignment of a text field

(0) ShareShare
ReportReport
Posted on by 3,315

Hi Guys,

I have added a consternated field (Currency + Price) on to item list page as a text field and this is left aligned and shows like below:

Currency and Price

$10.5

Is there a way to programmatically change the alignment to below:

Currency and Price

                      $10.5

Thanks

I have the same question (0)
  • Suggested answer
    Jack Davies Profile Picture
    120 on at

    User the AutoFormat properties on the page...

    AutoFormatExpression = '1,USD';

    AutoFormatType = 10;

    left-align.png

    The result is right aligned

  • Samantha73 Profile Picture
    3,315 on at

    This can work if we are looking at one currency but the price is defined in different currencies hence I'm concatenating two fields and autoformat needs a non text field. May be pass currency as a variable or something like that to Autoformat formula

  • Verified answer
    Jack Davies Profile Picture
    120 on at

    You can set the AutoFormatExpression to a function call as well ... AutoFormatExpression = GetFormatString();

    and then add code to return the relevant currency string

    procedure GetFormatString() : Text

    Begin

    CASE "Currency Code your Working in" OF

    'USD' : Exit('1,USD');

    'GBP' : Exit('1,GBP');

    //. . . . .

    END;

    end;

    you can also use AutoFormatType 11 and come up with you own formatting in the AutoFormatExpression (i.e. 'Golden Galleons <Precision,5:5><Standard Format,0>'

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,260 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,515 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,373

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans