I have an Apex page with a select list item populated from a SQL query that should default to the product of the item passed through from another page, however it always selects the first item in the list.
We need to set it so it selects the current category however I can’t see where this setting is. The version of APEX is 3.2.
Firstly, I suspect (correct me if I’m wrong) that your item is selecting the first item because the item is defined with
Display Null Valueset toNo; internally, however, the item is probablyNULL, but the list item cannot show it so it just shows the first list value. But I probably wouldn’t change this setting.To set the default value for a Select List item, set
Default Value TypetoPL/SQL Function Body, then enter your SQL query (that returns a single value) in theDefaultattribute for the item, with suitable PL/SQL around it, e.g.: