This content has been marked as final. Show 2 replies
See if you can make sense of this.
I honestly don't remember how I got this working but you might be able to sort it out!
I use this to flag table rows as published (viewable by users) or not.
The report query has this syntax:
select apex_item.checkbox(1,STUDENTALIAS || REPORTDATE,DECODE(PUBLISHED,'Y','CHECKED',NULL)) "PUBLISH",
Then there is an 'on submit before...' process that does this
--Set them all to N (not published) incase you have UNCHECKED any entries from last time
SET PUBLISHED = 'N'
WHERE STUDENTALIAS = :P2_STUDENT;
--Loop through all entries to see what is now checked
FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP
SET PUBLISHED = 'Y'
WHERE STUDENTALIAS || REPORTDATE = APEX_APPLICATION.G_F01(i);
--this section is just for confirmation notification
apex_application.g_print_success_message := '<span style="color:green">Data from ' || :P2_STUDENT || ' successfully updated</span>';
Just to add to Samuitsu's solution above...
Here's a link to the documentation that explains apex_application.g_f01 a little more.