Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Making select list - display and return values (Oracle Apex 19.2)
icon5.gif  Making select list - display and return values [message #678820] Thu, 16 January 2020 06:18 Go to next message
petar97
Messages: 120
Registered: October 2018
Senior Member


I have started to learn Oracle Apex, and I follow this document - https://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-spreadsheet-hol-5532109.pdf

They use this query:

select distinct status d, status r 
from spreadsheet
order by 1;
OR e.g.

select name, id 
from sample$project_milestones
order by 1;
The first is for display, the second is for return - this is clear.
But I can't understand the return value - where does it return?

Thanks in advance
Re: Making select list - display and return values [message #678838 is a reply to message #678820] Fri, 17 January 2020 01:46 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It is returned into an item. If that item is based on a table column, return value is actually stored into that column when you push the SUBMIT button.
Re: Making select list - display and return values [message #678873 is a reply to message #678838] Sat, 18 January 2020 06:44 Go to previous messageGo to next message
petar97
Messages: 120
Registered: October 2018
Senior Member
How do I know where it is stored?

select name, id 
from sample$project_milestones
order by 1;
After using this code - ID value is same

[Updated on: Sat, 18 January 2020 06:44]

Report message to a moderator

Re: Making select list - display and return values [message #678876 is a reply to message #678873] Sat, 18 January 2020 07:10 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Here's how it goes: suppose you created a form on a table. One of items represents project milestones. Table (you based the form on) contains the ID_PROJECT_MILESTONE column which is - via foreign key constraint - related to SAMPLE$PROJECT_MILESTONES table that contains both ID and project milestone NAME.

In Apex, that item's type is SELECT LIST whose source is a SQL query that looks like the one you posted above.

Once you run the form and fetch data from the table, it displays values currently stored into that table.

Now, if you navigate to the item that represents the project milestone and select some other value from the list and push the SUBMIT button, Apex will perform an update action on that table and substitute the old project milestone ID value with the one you selected from the select list item.

In order to check it, go to e.g. SQL Plus or SQL Developer or Apex' SQL Workshop or run a report on that table and verify whether the change has been made.
Re: Making select list - display and return values [message #680452 is a reply to message #678876] Fri, 15 May 2020 05:38 Go to previous messageGo to next message
petar97
Messages: 120
Registered: October 2018
Senior Member
Thanks @Littlefoot, this helps me a lot.
sorry for the late reply.
Re: Making select list - display and return values [message #680491 is a reply to message #680452] Sun, 17 May 2020 13:39 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No problem, you're welcome.
Previous Topic: Oracle Forms Timeout
Next Topic: How to use procedure with ref cursor
Goto Forum:
  


Current Time: Wed Dec 11 13:59:28 CST 2024