Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calling a process from a column link in a report

NewApexCoderJun 12 2013 — edited Jun 13 2013

Apex 4.2

I have a classic report that has column links. I'm having trouble calling a process upon clicking these links. I want to insert a record into the table when this link is clicked. So I have a process to update the database

{code}

DECLARE

   l

_vc_arr2     APEX_COLLECTION_GLOBAL.VC_ARR2;

BEGIN

   --apex_application.g_print_success_message := 'Sector Selection: ' ||:P122_SECTOR_SELECTION;

    l_vc_arr2 := APEX_UTIL.STRING_TO_TABLE(:P122_SECTOR_SELECTION);

     FOR z IN 1..l_vc_arr2.count LOOP

     --apex_application.g_print_success_message := 'TEST2';

     --htp.p(l_vc_arr2(z);

    

insert into ISECTOR_PHASE1_ACTIVATION

(PHASE_1_ACTIVATION_DATE, INSPECTION_SECTOR_ID, HIGH_WATER_EVENT_ID)

       values (:P122_ACTIVATION_DATE.l_vc_arr2(z),:P0_HIGH_WATER_EVENT_ID);

END LOOP;

END;

{code}

The query for the report is as follows:

{code}

seelct....

......

.......

case when current_activation_status ='Not activated' then

'<a href="f?p=&APP_ID.:122:&SESSION.:PHASE1">click here</a>'

else NULL

end as Link,

....

{code}

PHASE1 refers to the name of the process. I think there may be an error in how I'm building the link. I am building the link from the query because there will be other cases that determine which process will run. I.E. when current_activation_status = 'active' then '<a different link and process>'.

So I figure if I can accomplish this in one "if - then" clause of a case statement, then I can change it to accommodate multiple "if-then" clauses within the case statement.

Also, should REQUEST = PHASE1 in the condition of the process??


Thanks in advance. Let me know if more info is needed.

This post has been answered by Tyson Jouglet on Jun 12 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 11 2013
Added on Jun 12 2013
15 comments
5,834 views