web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sort by numbers and le...
Power Apps
Answered

Sort by numbers and letters

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Is there a way I can sort my combobox by ascending numbers and letters. For example I have 1a showing up in the middle and 10 at the top. I want it to go 1a,1b,2...etc. Some numbers dont have a part a,b. 

This is in my onvisible for the screen - ;ClearCollect(
scen,
{Result: "All items"}
);
Collect(
scen,
Sort(
Distinct(
UATData,
Scenario
),
Result
)
) Then the items for the combobox is scen.

Categories:
  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    Hi @Anonymous ,

    I would simply change the 1a to 01a - it would get very complex if not.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    I'v made a test for your reference:

    I assume there is a table:

    ClearCollect(
     UATData,
     {Scenario:"2b"},
     {Scenario:"1a"},
     {Scenario:"2a"},
     {Scenario:"10ac"},
     {Scenario:"10ab"}
    )

    You could try:

    Sort(
     Sort(
     Distinct(UATData,Scenario),
     Match(Result,"[a-zA-Z]+").FullMatch
     ),
     Value(Match(Result,"\d+").FullMatch)
    )

    The Result:

    vbofengmsft_0-1633662290356.png

    Best Regards,

    Bof

     

  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    @Anonymous ,

    Go with @v-bofeng-msft on this - a good solution

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This works thank you. I already made another post about this but the other trouble I am having is filtering within the combobox based on another column. For example this is my items in the gallery Filter(
    collUATMasterData,
    C5 = "Sales",
    If(
    IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All items",
    true,
    C5 in ComboBox1_2.SelectedItems
    ) && If(
    IsBlank(ComboBox1_3.Selected.Result) || ComboBox1_3.Selected.Result = "All items",
    true,
    C4 in ComboBox1_3.SelectedItems
    )&& If(
    IsBlank(Filter_1.Text),
    true,
    Filter_1.Text in C2
    ) && If(
    IsBlank(Filter.Text),
    true,
    Filter.Text in C6
    )). So my dropdown is bringing in items for other values of C5 = x but I only want the scenario combobox to show scenarios where C5 = Sales. Can I alter what you gave me to do this ? @v-bofeng-msft 

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!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard