Announcements
I have a combox box hooked up to a CDS(Dataverse) table. The values are in the following format.
Item-1, Item-2...Item-20
When the comboxbox loads and is sorted Ascending it puts Item-10 right after Item-1. Is the only way to sort these correctly is to put a '0' in front of the single digit numbers? I'd run into issues again when I get to Item-100. That would be place right after Item-10
@Future_Vision
What is your Items property formula currently for the combobox?
@RandyHayes
Sort(ShowColumns('Details',"crfeb_detail"),crfeb_detail)
Consider the following then:
DropColumns( SortByColumns( AddColumns( ShowColumns('Details', "crfeb_detail"), "num", Value(Match(crfeb_detail, MultipleDigits).FullMatch) ), "num" ), "num" )
This will use regular expression matching to pull the digits out and then convert to numbers.
It then sorts by the real numbers and finally drops the column we used to sort because we don't need it any more.
Ok. Mostly worked. I just realized I have some other items in there that break this somewhat. For example, to make this simple, I have Item-1...Item20 and Widget-1...Widget20. This code would put Widget-1 right after Item-1 then move onto Item-2 followed by Widget-2. I'd want to keep the Item-N together and the Widget-N together.
There ya go...leaving out details!! 🤣🤣
Give this a shot:
DropColumns( SortByColumns( AddColumns( ShowColumns('Details', "crfeb_detail"), "num", Value(Match(crfeb_detail, MultipleDigits).FullMatch), "nm", Match(crfeb_detail, MultipleLetters).FullMatch ), "nm", Ascending, "num" ), "num", "nm" )
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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 505
WarrenBelz 502 Most Valuable Professional
Haque 324