PowerFx to Add Row Numbers to Data Tables Directly
The Problem I recently hit a common but annoying issue while building a canvas app for Dynamics 365 Project Operations. The requirement was straightforward: display project tasks in the same order they appear in the D365 Project Tasks grid. When I connected the Project Task table directly to a data table control, the rows showed up in creation order instead of the logical sequence users expect. Tasks that should appear at the top were buried at the bottom. My first instinct was to sort by the msdyn_displaysequence column in ascending order. This got me closer, but revealed another issue: the D365 grid shows clean row numbers (1, 2, 3...) while msdyn_displaysequence contains decimal values like 1.5, 2.3, 4.7. This makes perfect sense from a data perspective. When someone inserts a task between positions 1 and 2, the system assigns it 1.5 instead of renumbering every subsequent row. Smart design, but not great for user experience. The Traditional Approach (And Why I Avoided It) Mos...