Question
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
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.
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
Virtusa
US
Hi ,
I went through the link and could not find any info related to field values .
Could you please check .
Thanks.
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
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
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
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
Ernst & Young Global Consulting Services
SV
Did you find the solution for this?
Virtusa
US
Nope , I dint
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.
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,
Virtusa
US
yes , for now its sorted , but if i want change to descending order , then how to change ?
Accepted Solution
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