Personalized Community is here!
Quickly customize your community to find the content you seek.
Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2022 Release Wave 1 PlanDynamics 365 release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.
2022 release wave 1 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
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:
Have anyone worked on same issue?
It will be really helpful.
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);
Hope this helps.
Business Applications communities