Solved

Oracle APEX 4 question

Posted on 2013-05-23
4
502 Views
Last Modified: 2013-05-31
I am new to Oracle APEX and have built what I think is a simple application.  I built an interactive report.  I have 4 parameters for the report, and I display the report in a region on the same page based on the query parameters. The report only displays two columns, an ID number (not unique), and a unique type.

Column1(IDCODE)       REP_TYPE
0987654321                  SAMPLE
0987654321                 ANOTHERSAMPLE

What I want to do is to set an item value to that of what is in Column1(IDCODE).  The reason I need to do that is so that I can then pass that item back to my database in a second query.
I hope this makes sense, I can elaborate further if necessary.
Thanks for any help you can give.
0
Comment
Question by:newtoperlpgm
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:ianmills2002
ID: 39193249
I assume you want to click on the value and kick off the second query?

Is this 2nd query used in a another report?
0
 

Author Comment

by:newtoperlpgm
ID: 39194571
Hello,
Something like that.  Yes, when I click on the link for that value I need that value to run a query against my database.  The 2nd query is actually a query outside of APEX, in Oracle though, so I need to have that value to store, and pass.  It gets more complicated...the report is not an APEX report, it's an Oracle Report 10 report.  That part I can do, if I have the value...
Thanks very much for your response and help.
0
 
LVL 6

Accepted Solution

by:
ianmills2002 earned 500 total points
ID: 39198310
I usually use standard reports in my APEX apps. In there, I can change the column definition to include a link to run some javascript.

e.g. Put this in the HTML Expression of the column definition
<a href="javascript:" onClick="javascript:variant_selected(#MDL_ID#, #MRG_ID#);" title="Click to view Accessories"><u>#VARIANT#</u></a>

That javascript function I will setup to set the value of the page item.

e.g.
function variant_selected(pi_MDL_ID, pi_MRG_ID) {
    $x_Value('P3_MRG_ID', pi_MRG_ID);
    $x_Value('P3_MDL_ID', pi_MDL_ID);
}


I just had a look at the interactive reports. It looks like in the column definition on the report, you may be able to set the value in the Column Link section of the column definition.

I also tried the same functionality and my javascript functionality worked. I put the link into "Link Text" field. Set the target to the same page as the report. I then had to put the Item names into the Item section before the link appeared on the report.
0
 

Author Comment

by:newtoperlpgm
ID: 39211000
Thank you.  
Your solution below worked for me.
I just had a look at the interactive reports. It looks like in the column definition on the report, you may be able to set the value in the Column Link section of the column definition.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 66
Oracle DATE Column Space 11 59
How can I rollback insert statements after commit in oracle? 7 54
oracle 11g 23 45
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

937 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now