This content has been marked as final. Show 8 replies
I don't think it is possible to arrange the order of the null option in a select list.
One line of jQuery code fixes your issue though:
Replace "P10_ITEM" with the item name of your select list and make sure it executes on page load.
Edited by: Howard (... in Training) on Apr 2, 2013 1:xx PM
The statement -
I don't think it is possible to arrange the order of the null option in a select list.- is close. You can't control the order of the Null value if you add the Null value through the GUI. However, it can be added and controlled as part of a SELECT ...
One way is to add NULL to the "SELECT". Here the Yes/No are hard-coded but they could have been selected from a table:
select d, r from ( select 'YES' d, 'Y' r from dual union all select 'No' d, 'N' r from dual union all select Null d, '<Null>' r from dual ) order by 1 desc NULLS last
That's just a jQuery/CSS selector. It represents the first item in your select list which is in our case the null option.
In my example, the select list page item is called P10_ITEM. I use this page item name in my jQuery/CSS selector.
If, for example, your select list page item is called P175_SELECT_LIST, then the appropriate code would look like this: