Page sorting DropDown field values
Hi,
This seems like a simple thing, but somehow it's not working for me, regardless of what I try.
I am trying to have a dropdown field showing numbers 1-20. When you click on the dropdown it's sorted as below
1,10,11,12,13,14,15,16,17,18,19,2,20,3,4,5,6,7,8,9
I tried populating the dropdown values with a dynamic view (sql in the dynamic view is sorted correctly) and when that didn't work, tried to populate the dropdown field values with Peoplecode and got the same results:
Can you please let me know how you would go about either populating or sorting the values so that they are not sorted as above but normally.
Answers
-
What is the field data type that you are using? Did you try changing it?
Balaji P.
-Bala P.
0 -
Hi Balaji P.
Yes, I have the field in one page as "Number" and in another page as "Character". It doesn't make a difference in the sort order or the numbers.
-Eb
0 -
Eb - we had this discussion earlier. Refer below.
You can try to manipulate the sort order by couple of ways.
1. Use a view in translate value based on table.
2. Manipulate the translate value using peoplecode with below 2 function. At the run time clear the dropdown(ClearDropDownList) and then do the sql select from DB using order by clause and use AddDropDownItem function
ClearDropDownList()
AddDropDownItem(CodeString, DescriptionString)
https://docs.oracle.com/cd/E41633_01/pt853pbh1/eng/pt/tpcr/langref_FieldClassMethods-07149e.html
Let us know if you need any help with peoplecode.
Hope this helps!
-Velu
0
