Good morning all,
I found an issue with the modern Table Control, namely that it was sorting numeric (double) Dataverse Columns as textual fields rather than as numbers. I have found the same issue in other table-type controls, such as DataTables, and various PCF components.
I decided to go back to basics. So, I revisited the Gallery control and implemented manual sorting via PowerApps code in the Items property using a Switch command to select the column to sort on within a single Sort statement. However, I encountered the same issue.
So, my next step was to replace a single Items selection code SORT statement with completely separate Sort statements. This worked perfectly, with the number column sorted properly.
So, this works:
Switch
( var_Sort_Column
, "Name", Sort (coll_Accounts, Name, var_SortOrder)
, "Balance", Sort (coll_Accounts, Balance, var_SortOrder)
, Sort (coll_Accounts, Name, var_SortOrder)
)
But this doesn't
Sort
(coll_Accounts,
Switch
( var_Sort_Column
,"Name", Name
,"Balance", Balance
, Name
),
var_SortOrder
)
This is fine, but I am still left with a manual solution.
So, my questions is, does anyone know of an out-of-the box component that will sort all datatypes properly (not just text fields)?
Thanks, Craig