Reputation: 1954
I'm having a problem where an Oracle APEX data grid cell is showing the list of values ID rather than the name. The Data Grid column has an LOV (List of Values) attached to it. The LOV select statement SQL:
select ps.sort_by_num||') '|| s.strategy_name AS d,
s.strategy_id AS r
from strategies s, period_strategies ps
where ps.strategy_id = s.strategy_id
and ps.period_id =:P11_PERIOD_ID
ORDER BY ps.sort_by_num
:P11_PERIOD_ID
is coming from a separate region in the page.
When the data grid is displayed, it's showing the strategy_id rather than the desired display name. When I click on the grid cell, it does pull up the correct name which should be displayed. As soon as I click off of the selected cell, the ID is then shown again.
How do I get the LOV to show the correct display name when the cell is not selected?
Upvotes: 0
Views: 504
Reputation: 1954
Adjust the select statement so that its all in the from clause of another select statement.
select d, r from
(select ps.sort_by_num||') '|| s.strategy_name AS d,
s.strategy_id AS r
from strategies s, period_strategies ps
where ps.strategy_id = s.strategy_id
and ps.period_id =:P11_PERIOD_ID)
ORDER BY d
Upvotes: 0