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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Facing Issue while Sorting in Canvas Apps

(0) ShareShare
ReportReport
Posted on by

Hi All,

I have created dropdown field in Canvas app and connected it with 'Design Project Task' Entity which is having option set named as 'Task Status'. 
I used following formula in item of Dropdown I created in Canvas App:

Sort(Distinct('Design Project Tasks', 'Task Status'), Ascending)

Now, it is showing me Distinct Option Set list. But not sorting this list. 

1. I Checked field option values in solution. They are in sequence.

2. I tried SortByColumns formula but it is not working.

It looks something like this:
pastedimage1651836492237v1.png

Have anyone worked on same issue?

It will be really helpful.

Thanks,

Mayur

I have the same question (0)
  • Inogic Profile Picture
    709 on at

    Currently, there seems to be no way to sort distinct options of an option set field for a drop-down control. However, you can use the workaround given below to achieve this requirement.

    We will add a column in the collection which will store the textual value of the required option set. After this, we can sort this collection based on the textual value column we have created. In the end, as the last step, we can use this collection to get the distinct values from the collection.

    Following is the working example for Ownership (OOB option set field) of Accounts Entity-

    Distinct(SortByColumns(AddColumns(Accounts,"ownershipcolumn",Switch(Ownership,'Ownership (Accounts)'.Other,"Other",'Ownership (Accounts)'.Private,"Private",'Ownership (Accounts)'.Public,"Public",'Ownership (Accounts)'.Subsidiary,"Subsidiary")),"ownershipcolumn",Ascending).ownershipcolumn,ownershipcolumn);

    Canvas-Apps.png

    Hope this helps.

    Thanks!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans