Question
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
Virtusa
US
Last activity: 30 Oct 2018 21:35 EDT
Sorting Drop down sourced from Field Values
Hi ,
If a DropDown is sourced from a field Value property , how can we can sort the data ?
Can we use Override Sort Function in Property (Advacned Tab) ? if So is there a sample code to reference ?
Thanks.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
You can override, @baseclass.GetListOfFieldValues activity and customize to execute step 4 and 5, so that obj-sort method is executed. with this you can sort in ascending or descending order.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Hi
Please check this post https://www.pegaxchange.com/2017/05/11/sort-pega-7-dropdown-options/, this has all the steps described to sort field values.
Thanks
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
Virtusa
US
Hi ,
I went through the link and could not find any info related to field values .
Could you please check .
Thanks.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
Hi
Please check the attached screenshot. Its from the same link I provided.
Thanks
-
Romain Delalande Divya Durga Konakalla Krishna Devarayalu Ichapurapu
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
Virtusa
US
I dont have a Data Page or list property to use Sort in Data Transform , attached is the document on how i am sourcing the dropdown
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Aaseya IT Services Pvt Ltd
SA
Setting class name of result page as ‘applies to class’ in the parameters passed to ‘Obj-Sort’ method, addresses this issue.
or follow the below link -
https://community.pega.com/support/support-articles/need-display-values-dropdown-sorted-order
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
Virtusa
US
Hi ,
I think this will be applicable if we used a name page with pxResults to source the dropdown , currently i am using the field value property to source the drop down , i do not have a pagelist property to use in obj-sort method , attached doc for reference
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-03/494d894f-7ed4-4a09-ad94-2f6d14f28953.png?itok=tVilRDtY)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-03/494d894f-7ed4-4a09-ad94-2f6d14f28953.png?itok=tVilRDtY)
Ernst & Young Global Consulting Services
SV
Did you find the solution for this?
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
Virtusa
US
Nope , I dint
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
US
Hi Adithya
I am a little confused. The list that you have shown already shows the results in sorted order
(L, M, N, O). Is that coincidentally showing in the right sorted order?
Unfortunately, I don't have an example written out. But I am attaching help for override sort function as well another community post that together should perhaps help you with attempting to use override sort function. See if it resolves your issue.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-03/494d894f-7ed4-4a09-ad94-2f6d14f28953.png?itok=tVilRDtY)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-03/494d894f-7ed4-4a09-ad94-2f6d14f28953.png?itok=tVilRDtY)
Ernst & Young Global Consulting Services
SV
Do you know an OOTB way of sorting the values in a dropdown by its localized value?
The dropdown is in a section and is sourced with a property with a table type of field value. Records are getting sorted by its original value but not the localized one.
Original Value | Localized value:
United States | Estados Unidos, Dominican Republic | Republica Dominicana, Netherlands | Holanda.
In the example we should be displaying the list in the next order:
Estados Unidos -> Holanda -> Republica Dominicana
Instead we are getting:
Republica Dominicana -> Holanda -> Estados Unidos (Original value alphabetical order)
Thanks,
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689950000/d47045df-86e1-439e-bba1-56313191da02.jpg?itok=eS9sGDWK)
Virtusa
US
yes , for now its sorted , but if i want change to descending order , then how to change ?
Accepted Solution
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
You can override, @baseclass.GetListOfFieldValues activity and customize to execute step 4 and 5, so that obj-sort method is executed. with this you can sort in ascending or descending order.
-
Tushar Sharma Cherry Faizi