Working with PowerApps and Managed Metadata Columns in SharePoint online can be a huge pain. Turns out custom sort order in the Managed Metadata is not supported, but you can force a sort order in your app.
I have tried several solutions to the apparent issue that Custom Sort Order in Managed Metadata Fields is not supported. Here I have a list of Payment Methods sorted in the Managed Metadata term store using a custom sort order.
Then in SharePoint the order is respected.
Yet, in PowerApps, it is not.
SortByColumns function you can specify the Choices available to the combobox control items property and sort ascending or descending. I was hoping that there was a hidden attribute of the field that I could use to force the sort, but I couldn’t find one. The typical syntax is to add
Descending for the sort direction.
Turns out you can also provide an array of values to force the sort order. For example
SortByColumns(Choices('My Data'.PaymentType),"Label",["Credit Card","Cash","Check","Paypal"])
Of course this means you have to manage the sort order in two places, so this isn’t a fix so much as a work-around.
Ready to start your next project with us? That’s great! Give us a call or send us an email and we will get back to you as soon as possible!