cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tlevine
Kudo Commander
Kudo Commander

Sorting by Ascending or Descending in Dropdown

Hi Community - I haven't been able to figure this one out but I am hoping it's pretty simple. The issue is that the list of items in my drop down are not sorted properly in accordance with the code listed below. To get the items for my drop down, I am finding the distinct values from my column called "Column Name" which is stored in a SharePoint List called "ListName".  I am then looking to sort these in ascneding order.

 

Thanks in advance.

 

 

Sort(
    Distinct(
        'ListName',
        Trim('ColumnName')
    ),
    Ascending
)

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@eka24 hi - I was able to achieve the results successfully using the following structure:

 

Distinct(
    Sort(
        'ListName',
        Trim('ColumnName'),
        Ascending
    ),
    'ColumnName'
)

View solution in original post

4 REPLIES 4
eka24
Super User III
Super User III

Have you tried SortByColumns. Also what type of values do you have in the column, numbers or text?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

tlevine
Kudo Commander
Kudo Commander

@eka24  - the column is text, but I have not tried sortbycolumns, i will try this now and share the results

@eka24 hi - I was able to achieve the results successfully using the following structure:

 

Distinct(
    Sort(
        'ListName',
        Trim('ColumnName'),
        Ascending
    ),
    'ColumnName'
)

View solution in original post

eka24
Super User III
Super User III

That's fine. Mark the solution to close it since it resolved

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (83,867)