?
Solved

Oracle APEX 4 question

Posted on 2013-05-23
4
Medium Priority
?
545 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
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 how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Suggested Courses

765 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