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 :
Microsoft Dynamics NAV (Archived)

A Decimal value 88.5 in the list as right-aligned text 88:30

(0) ShareShare
ReportReport
Posted on by

Hi,

I want to have in the list a decimal value of 88.5 as right aligned text (Example: 88:30).

I tried to solve this problem with c# code, but it's works only with Text-box or label and in the list is hidden :(

In other words, for me it's important that a list-field whose data type is Text was aligned to the right.

How can I solve this problem?

Thanks

Cezary

*This post is locked for comments

I have the same question (0)
  • Suresh Kulla Profile Picture
    50,269 Super User 2026 Season 1 on at

    Are you referring to the page or report ? if on page try Format Function on report you can use convert function to convert into text and format.

  • Rabin Profile Picture
    2,976 on at

    Hey,

    Use "ROUND" function with Precision "0.001"

    ==>ROUND(1234.56789, 0.001, >) returns 1,234.568

    Ref: msdn.microsoft.com/.../dd301418.aspx

  • Community Member Profile Picture
    on at

    on the page, but after converting the text (each text) is aligned to the left.

  • Community Member Profile Picture
    on at

    Thank's but for me it's important that a list-field whose data type is Text was aligned to the right.

  • Verified answer
    keoma Profile Picture
    32,729 on at

    it seems that control-addins are disabled within repeaters. so it won't work anyway.

    follow forum.mibuso.com/.../trying-to-do-a-control-add-in-in-a-list-page

    it only works in page types like card.

    as a workaround you could work with PADSTR: format the value as you like, fill the value at the beginning with as much spaces you need according the text length of the field.

    for that follow forum.mibuso.com/.../format-text-with-leading-zeros

  • Verified answer
    Ashwini Tripathi Profile Picture
    4,624 on at

    You can use Decimal property on Table & Page or you can use Round function on trigger OnAfterGetRecord.

    If your source field is Text use Format function.

    It will be better to stick to Nav Standards.

    Although it is possible to right allign the decimal or integer values of text field by converting the value to Variant, but other limitation and issues creaps in, to handle it again you will require to do some customizations.

    One way more you can write a function and fix the max no of characters that can be displayed in the field. Get the length of the value and add no of spaces in front similar to PADSTR which does same thing at the end of the string basically reverse functionality.  And call the function in OnAfterGetRecord.

    Or you can add the decimal variable on the page and assign the value from this field to decimal field in OnAfterGetRecord trigger. You need to Round the Value with proper precession. Provided you are not going to perform filtering, although will work but processing will be slow.

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans