Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Select list in Tabular Form using PL/SQL Function Body returning SQL Query

GrahamJRNov 11 2016 — edited Nov 15 2016

I am developing in APEX 5.0.4.00.12 and am seeing the following behaviour and am wondering if this is a bug or an incorrect 'List of Values' Type option.

In a tabular form I can set an item as a select list and assign it a 'List of Values' Type option of 'SQL Query' and give it a query like this:

select text as d, code as r from LKUP_TABLE

This works as expected on the tabular form

However in the tabular form if I set an item as a select list and assign it a 'List of Values' Type option of 'PL/SQL Function Body returning SQL Query' and give it a statement like this:

RETURN 'select text as d, code as r from LKUP_TABLE';

This does not work on the tabular form - it loads the whole statement string as the select list display value.

The above scenario all works as expected in a standard form select list item.

Has anyone else got this option to work or am I doing something wrong?

I would eventually want to use a more complex PL/SQL statement in but the simple example above shows the behaviour.

Thanks for any advice.

This post has been answered by InoL on Nov 11 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 13 2016
Added on Nov 11 2016
3 comments
1,334 views