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

List that infinitely replicates an element by rounding and sorting

(0) ShareShare
ReportReport
Posted on by 40

Hello!

We have have a problem when we try to show a column in a list which value cames from a FlowField and we round the value. When we sort by that column the system starts to replicate the row to infinity.

I have prepare an example project with the minimum code to reproduce the problem.  [View:/cfs-file/__key/communityserver-discussions-components-files/758/TestRoundError.zip]

We have created a new table for save "Designs". It is a new table where we can save decimal values that, later, will be rounded. The "Item" table has the weight and length fields that cames from the "Design" table. They are defined as a FlowField. Later, we display the columns in "Item List" window. In the page we have the trigger "OnAfterGetRecord" that rounds the values of the fields weight and length.

Steps to reproduce the problem (based on the attached project):

  • Search for Design in the "tell me" box.
  • Select the option "Design List".

pastedimage1603191272581v1.png

  • We create a new element and in the weight and length field we add more than 2 decimals.

pastedimage1603191343746v2.png

  • Now, we create a new Item. Search for "Items" (Items List).

pastedimage1603191472566v3.png

  • Click on "New".
  • In the Edit window we will see a new section (at the top) called "Custom". Here we have two fields. We leave the first one (combo) with the default value. In the second one "Desing" we select the design that we have create.

pastedimage1603191650061v4.png

  • Once the record is saved (we need to enter the required No. field) we return to the list window.
  • We will see the new item and, at the end, the new columns rounded. From 150.0124 to 150.01.

pastedimage1603191753855v5.png

  • Now click on the "Design Length" column to sort it.
  • The element will begin to appear infinitely.

pastedimage1603191944491v6.png

Additional note: we round the values in the Page because we want to only round them for visualization and not in database with the Decimal places.

Hope that with the example you will be able to reproduce it. We have test in 16.5 and 17 versions.

Thank you!

  • THE Italian Profile Picture
    Microsoft Employee on at

    I will try this later on

  • DavidES Profile Picture
    40 on at

    Thanks!

  • Verified answer
    THE Italian Profile Picture
    Microsoft Employee on at

    Tested with 17.x. Simply it does not sort on calculated fields and everything is reported to zero. 

    I would create extra fields instead called Rounded Design Length and Rounded Design Width. This would also avoid calculation in the list every single time it is loaded. 

  • DavidES Profile Picture
    40 on at

    Thank you! At the time we thought about that solution but creating fields with the rounded value implies having to maintain them not that it is delicate but we wanted to avoid that type of repetitions.

    We are going to implement your proposal.

    Thank you!

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 624 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 440 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 244 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans