Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Get Value from Drop Down (Oracle APEX 11g Express Edition Release 11.2.0.2.0 )
Get Value from Drop Down [message #650475] Tue, 26 April 2016 05:35 Go to next message
gjdbouwer@gmail.com
Messages: 1
Registered: April 2016
Junior Member
Good afternoon everyone.

Please may someone help me?
I am very new to SQL and Oracle.

I have a drop down with items that are being read from a column in my table.
I would like to have a one line interactive report that reads the selected item from the drop down and then searches the database for the other columns related to the drop down list item. The list items are unique, so it should always return only the one line.

I currently have

SELECT FIRSTNAME, GENDER
FROM MEMBERS WHERE MEMBERID = cb_MemberID;

Please note, I need a SQL command to do this.

Please note that I was a C# programmer before, so this is a bit confusing to me...

Regards,
A Starting out SQL Developer

[Updated on: Tue, 26 April 2016 05:39]

Report message to a moderator

Re: Get Value from Drop Down [message #650534 is a reply to message #650475] Wed, 27 April 2016 03:34 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Here's how I do it.

First, create an interactive report (IR) which displays data you're interested in. Its SELECT statement would be
select firstname, gender
from members


Then edit the page and create page item (its type will be "Select list") in the IR region. Its List of Values definition will be
select member_description display_value,
       member_id          return_value
from some_table
Suppose that select list item name is P1_MEMBER_ID. Modify its "Page Action when Value Changed" property to "Submit page".

Now edit IR's query and add the WHERE clause which will utilize select list item:
select firstname, gender
from members
where memberid = :P1_MEMBER_ID


Run the page.

Select a value from select list item. Once you do that, because of the "Page Action when Value Changed" set to "Submit page", its value will be submitted and the IR will automatically refresh, displaying only values related to the selected MEMBER_ID value.

That would be all (unless I misunderstood the question).

[Updated on: Wed, 27 April 2016 03:34]

Report message to a moderator

Previous Topic: Open APEX app outside my network
Next Topic: IMPORT APPLICATION 555 to 101 why
Goto Forum:
  


Current Time: Thu Mar 28 10:22:42 CDT 2024