Last activity: 30 Oct 2018 21:35 EDT
Sorting Drop down sourced from Field Values
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 ?
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.
I went through the link and could not find any info related to field values .
Could you please check .
Please check the attached screenshot. Its from the same link I provided.
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
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 -
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
Did you find the solution for this?
Nope , I dint
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.
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)
yes , for now its sorted , but if i want change to descending order , then how to change ?
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.