This discussion is archived
2 Replies Latest reply: Jan 17, 2013 5:21 AM by KeithMalay RSS

Report with check box

Vedant Explorer
Currently Being Moderated
Dear Friends,
using apex 4.1.
I have created form with report. On report I have defined column as check box. As many check boxes i have ticked and click on approve button.

How i can execute my process and validation on approve button as many checkboxes i have ticked.

Could you send me any tutorial or link where i can see how i can do this?



Thanks & Regards
Vedant
  • 1. Re: Report with check box
    948638 Newbie
    Currently Being Moderated
    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

    BEGIN

    --Set them all to N (not published) incase you have UNCHECKED any entries from last time

    UPDATE MRCOMMENT
    SET PUBLISHED = 'N'
    WHERE STUDENTALIAS = :P2_STUDENT;
    COMMIT;

    --Loop through all entries to see what is now checked

    FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP

    UPDATE MRCOMMENT
    SET PUBLISHED = 'Y'
    WHERE STUDENTALIAS || REPORTDATE = APEX_APPLICATION.G_F01(i);

    END LOOP;

    COMMIT;
    END;

    --this section is just for confirmation notification

    apex_application.g_print_success_message := '<span style="color:green">Data from ' || :P2_STUDENT || ' successfully updated</span>';
  • 2. Re: Report with check box
    KeithMalay Explorer
    Currently Being Moderated
    Vedant,

    Just to add to Samuitsu's solution above...

    Here's a link to the documentation that explains apex_application.g_f01 a little more.

    http://docs.oracle.com/cd/E10513_01/doc/apirefs.310/e12855/apex_app.htm#insertedID2|http://docs.oracle.com/cd/E10513_01/doc/apirefs.310/e12855/apex_app.htm#insertedID2

    Keith Malay

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points