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!

Loop through Selected rows of a report

Richie VJun 1 2017 — edited Jun 1 2017

I need to select a row of data from an apex report here is a snippet form the report

pastedImage_0.png

So what I need to do is check some stuff when delete is checked. Basically if the staff has an open ticket I need to prevent them from being deleted (if their row is selected).

I'm trying to loop through the rows of the report using this code :

declare checked_row number; vName number;

begin FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP

Begin  checked\_row := apex\_application.g\_f01(i); -- load up the row number that was checked

vName := apex_application.g_f05(checked_row);

If vName = 32028 then

update station_staff set fre_station_role = 'working';

end if; end;END LOOP;

This logic is not working (forget about the code that is just test code in between the begin statement) I can't access the data in the report rows via f01, f02 when I do that is seems to pull data from the database.

I think this code would work with a tabular form were the f01 values correspond to each column, however it isn't working with a report.

How do I loop properly through any rows selected so I can create a process on delete click?? Once I can access the data I can finish the code.

So basically from my snippet shot, I need: Role, name, station, employee id, phone and fre station role FOR ONLY THE SELECTED ROWS from this classic report on this page.

Any help would be appreciated, thanks.

This post has been answered by Richie V on Jun 1 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2017
Added on Jun 1 2017
1 comment
1,291 views