user2311129
user2311129

Reputation: 21

oracle apex 4.2 : populate a form when page is loaded

How can I populate the form when the page is loaded

I have tried an query base form, and a automatic fetch, but neither will display any data when the page loads.

Upvotes: 2

Views: 9032

Answers (2)

MrG
MrG

Reputation: 1623

When using the page wizard to create a query based form, the query given in the wizard is only used to define the fields on the form and create the corresponding page items. It is not used to subsequently populate data.

For that you need to add a process in a region above/before your form. Make the process PL/SQL type and provide your query there. Assuming your form is on page 2 and has fields ID and Name, use:

select name into :P2_NAME from my_table where id = :P2_ID;

The page or link that calls page 2 will need to set the value for P2_ID.

Upvotes: 0

NoGotnu
NoGotnu

Reputation: 346

You must create "Automated Row Fetch" process on the page. For each item on page change the "Source Type" to "Database column", and enter column name in "Source value or expression".

Upvotes: 0

Related Questions