Triggers in checkbox apex

Hello all,
I'm having a problem that i believe is a basic apex question and I need some help with it:
I have a table where I have a column "acceptance". I need to create a report or a tubular form with to check boxes to manipulate this column "acceptance" :
"Accepted" check box and
"Rejected" Check box.
In this grid the user will be allowed to accept or reject the row clicking in one of the check boxes. Wen the user click in one of them I need to clear the other and them turn off the check boxes.
My question is how can i do this?
As far as I investigate, I don't have nothing similar to when-check-box-change in forms.
My approach to this question ( that doesn't work ) is to define in the query to columns :
CASE WHEN ACCEPTANCE=1 THEN
APEX_ITEM.CHECKBOX(11, "ACCEPTANCE",'enabled','onChange= "test();"')
ELSE
APEX_ITEM.CHECKBOX(11, "ACCEPTANCE",'disabled' ,'onChange= "test();"')
END "Rejected",
CASE WHEN ACCEPTANCE=0 THEN
APEX_ITEM.CHECKBOX(11, "ACCEPTANCE",'enabled','onChange= "test();"')
ELSE
APEX_ITEM.CHECKBOX(11, "ACCEPTANCE",'disabled' ,'onChange= "test();"')
END "Accepted"
the test function is a javascrit function the will disable the other checkbox. At this moment in time the function just send a message. the functiom is tested through a button the message is displayed but when the check box changed nothing happens.
I appreciate if you can help me in this subject.
Thanks

Try this
Query
  SELECT ...
          ,'<input type="checkbox" name="accept" value="1"  '||decode(ACCEPTANCE,1,'checked=checked',NULL)||'/>' ACCEPT
          ,'<input type="checkbox" name="reject" value="0"  '||decode(ACCEPTANCE,1',NULL,'checked=checked)||'/>'
          ||APEX_ITEM.HIDDEN(11,ACCEPTANCE)  REJECT
FROM ..Now you should have two checkboxes in two column columns( and a hidden item which has the chosen value) and one of them checked(first one for acceptance column=1 and other if not)
Now for some JS code which does the checkbox toggling
Add the following code to "execute when page loads"
  $('input[name=accept],input[name=reject]').click( function() {
    other_checkbox = $(this).parents('tr:first').find('input[type=checkbox]').not(this);
    hidden_item = $(this).parents('tr:first').find('input[name=f11]');
    if (  $(this).is(':checked')  ) {
      other_checkbox.removeAttr('checked');
  else {
      other_checkbox.attr('checked','checked');
   other_checkbox.val( $(this).val() );
  });When the page submits the f11 array would have values 1 or 0 for each row which you can use in PLSQL processing.

Similar Messages

  • Event triggered for checkbox in cl_gui_alv_grid

    Hi All ,
    I have a requirement like ,i give PO number on selection-screen.After execution, the items should be displayed on second screen ,which has some options on the top like before GR or after GR .(custom screen designed with cl_gui_alv_grid for display)
    I desgined checkboxes for each row of the line item.user can click on multiple rows and click on EXECUTE button on the screen.After that smartform should trigger and print .
    Now my query is how to capture the checkboxes which the user has entered (thru cl_gui_alv_grid) . Is there any event that gets triggered upon clicking the checkboxes?? I need the data of the corresponding row to process further .User can click on multiple items.
    Please respond
    Thanks

    Hi Hemanth
    You should have a field in your internal table matching the checkbox column in ALV.
    Call method CHECK_CHANGED_DATA of CL_GUI_ALV_GRID on user command for execute button,
    it will set the field  = 'X' for ticked lines in your internal table.
    Then use a loop on your internal table and find selected lines.
    You don't need an event triggered when user clicks.
    Edited by: Bulent Balci on Aug 3, 2010 4:42 PM

  • Checkboxes: ApEx vs Oracle Forms

    I'd like to create a checkbox that behaves the way checkboxes do in Oracle Forms.
    The underlying database column can hold the values 'Y' or 'N'.
    I'd like a 'Y' to cause the checkbox to be checked and an 'N' to have it unchecked.
    Similarly, if I check an unchecked checkbox, I'd like the value of 'Y' to be put into the column.
    Fairly standard behaviour, I would have thought, but I can't get ApEx to do it.
    Any ideas?

    See Re: Saving checkboxes to table

  • Checkbox-APEX 'forms'

    Hello,
    there is a checkbox in a 'form'. After a pl_sql process is successed, the process must check this checkbox. Do you know the syntax?
    Thank you
    Jean-louis

    Jean,
    there is a checkbox in a 'form'. After a pl_sql process is successed, the process must check this checkbox. Do you know the syntax?You can post it here in Apex Oracle Application Express (APEX)
    -Anantha

  • View with Instead of Trigger - ORA-01031

    I am having trouble with a form based on a view that uses an instead of trigger.
    When I attempt to update a complex view that uses instead of triggers in an APEX form, I get the following message:
    ORA-20001: Error in DML: p_rowid=21388, ... ORA-01031: insufficient privileges
    The view works correctly when updates are executed from SQL Plus.
    The view "VW" is based on several tables in the application schema "X", which is parsed by APEX, and several tables in another schema "Z". I have explicitly granted select permission on the tables in schema "Z" to schema "X", but this doesn't resolve the error.
    Any idea how to fix this problem? From reading other posts, it sounds like the only issue should be explicit grants on the tables in other schemas. I do not attempt to update the tables in schema "Z", and do not have update permissions to those tables.
    Sinerely, Justin

    Justin,
    you might try to grant the views to the FLOWS_xxxxx user, which performs the Apex processes.
    Dik Dral

  • Number doesn't support applescript!?!

    I was sincerely hoping that numbers supported embedded applescript or at least applescript triggers (from checkboxes, buttons, etc). Internal Applescript support was the critical requirement to use it, and replace excel.
    I was blown away that is doesn't even support applescript at all!!! Apple not even supporting their own scripting technologies?
    Bizarre.

    Can someone please help us with this? We don't know if this is a Win2K file system issue, Tomcat, or our EDK install ...
    I'm hoping someone has run across this before and can help.
    Thank you,
    Jeff Conners
    Staples, Inc.

  • HTTP-404 \nwwv_flow.accept: SIGNATURE (parameter names) MISMATCH\nVARIABLES

    Hello Experts,
    Im getting following error on my Apex Application :-
    [Mon Jan 17 12:23:56 2011] [error] [client 148.197.8.17] [ecid: 85107896978,1] mod_plsql: /pls/jdbtest/wwv_flow.accept HTTP-404 \nwwv_flow.accept: SIGNATURE (parameter names) MISMATCH\nVARIABLES IN FORM NOT IN PROCEDURE: CHECKBOX\nNON-DEFAULT VARIABLES IN PROCEDURE NOT IN FORM: \n
    I've got a form which a has a select list, depending on the select list, Check boxes are displayed on the form
    I've got the following code in "HTML Form Element Attributes" for the Select list Item :-
    onchange="setCheckbox(this, 'P3_CHECKBOX_ITEM');"
    And I've got the following AJEX to create the Checkboxes :-
    function setCheckbox(pThis, pItem){
    var l_code = '';
    var l_code1 = '';
    // Get checkbox name
    rName = $x(pItem).firstChild.name;
    alert(rName);
    // Fire AJAX
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=CHECKBOX_LIST',0);
    get.add('F109_SELECTLIST_ITEM_1',pThis.value);
    gReturn = get.get('XML');
    if (gReturn)
    var values = gReturn.getElementsByTagName('value');
    var messages = gReturn.getElementsByTagName('message');
    // Build the checkbox
    for (i=0; i<values.length; i++) {
    var rValue = values.firstChild.nodeValue;
    var rMessage = messages[i].firstChild.nodeValue;
    if (rValue != 1) {
    // l_code+='<DIV ID="P3_CHECKBOX_ITEM">Roles</DIV>';
    //alert(rName);
    l_code+='<input id='+pItem+' type=checkbox value='+rValue+' name="checkbox">';
    l_code+='<label for='+pItem+'_'+i+'>'+rMessage+'</label>
    if (l_code=='')
    l_code1 += '<DIV ID="P3_CHECKBOX_ITEM"></DIV>';
    else
    l_code1 = '<br><DIV ID="P3_CHECKBOX_ITEM">Roles</DIV>'+l_code+'</br>';
    $x(pItem).innerHTML = l_code1;
    Everything works as it should I don't tick any of the check box, but as soon as I tick the check boxes I get the above mentioned Error.
    Can anyone please help?
    Thanks

    You are trying to create a checkbox on the fly and submit it with the page.
    But then APEX checks all the submitted items, detects your checkbox and doesn't know where to put it. So it raises an exception.
    You should disable your checkbox before submit, then it won't get sent back to the server. You also could remove the "name" attribute of your checkbox, APEX will ignore it then. Whatever suits your needs best.
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • Enter event not triggering for read-only checkbox

    I have some objects in a form that get "locked" when the user signs the form.  I'm not using the digital signatures.  Instead, when the user types their name into the signature text field, a script runs on the change event that makes all of the fields in the form read only.  It also unlocks the fields if the signature is deleted.
    I was worried that we would get a lot of phone calls with users that didn't understand that the form had locked ("Why doesn't this form work?!"), so I added some code to the enter event for all of the fields that would pop up a messagebox to explain to people trying to edit a signed form that the form was locked and that they would need to delete the signature to edit the form.
    This plan works perfect for my text fields and decimal fields.  It does NOT work at all for my checkboxes.  For some reason, the enter event is never triggered for read-only checkboxes.  I don't see any other events that would obviously work for me though.  Any ideas?
    Thanks

    Thanks, those are reasonable suggestions.
    In the first suggestion, I'm unclear about one aspect of how I would accomplish this.  I assume I would allow people to modify fields in the form, but that when they did, a msgbox would pop up that would inform them that, if they continued with this modification to a signed form, the signature would be removed.  I'm all good to that point.  But if they answered that they do not want to continue modifying that field and removing the signature, how can I code it to set the value back to what it was before the change?  Is there some method that will give me access to the value of the field BEFORE the attempted modification?  I went looking for something like $.previousvalue, but found nothing.
    I'd suggest that I could use a two-stage solution, in which I store the previous value on the enter event, and save it just in case they do not want to change the field when prompted by the msgbox, but since the enter event does not exist for checkboxes (my original problem), that seems like it won't work.
    As far as radio button suggestion, I like radio buttons very much except for one fatal flaw: they aren't (as far as I can tell) clearable.  That is a shame.  Clearly some people (like me) want both exclusivity AND clearability.  And we'd like the controls to have an enter event.  But I know I'm demanding   Anyway, as it is, I just end up having to use checkboxes and create a boatload of silly code to make them exclusive.
    Emily

  • Unable to get checkbox working in Apex 3.2.1.00.10

    We recently upgraded our production application running on apex to Apex 3.2.1.00.10. Everything works, except for the query that generates the check-box. This used to do so in the previous version 3, but does not work anymore, the code is the same...Any help is appreciated.
    (SELECT app_user, app_session, hier_username, NULL, NULL, NULL, NULL,
    ' ', HTMLDB_ITEM.checkbox (2, 1, 'onClick = "WssMasterCheck()"')
    FROM wss_uform_data
    GROUP BY app_user, app_session, hier_username)
    UNION ALL
    (SELECT app_user, app_session, hier_username,
    HTMLDB_ITEM.hidden (11, hier_code_combination),
    HTMLDB_ITEM.hidden (12, hier_parent_level_number),
    HTMLDB_ITEM.hidden (13, hier_level_type), hier_level_number,
    hier_level_name,
    HTMLDB_ITEM.checkbox (3,
    hier_level_number,
    DECODE (checked, '0', NULL, 'CHECKED')
    ) -- this is one that is not working, and does not show as checked.
    FROM wss_uform_data
    WHERE hier_level_type =
    wss_preferences_pkg.get_default_value ('WHOLESALER_LEVEL_TYPE'));

    Not sure what happened, as I had tried this before too, but I did do the change below and was trying to debug the issue on my own and trying some options, and all of a sudden it started working...The only change that I did is below:
    (SELECT app_user, app_session, hier_username, NULL, NULL, NULL, NULL,
    ' ', HTMLDB_ITEM.checkbox (2, 1, 'onClick = "WssMasterCheck()"')
    FROM wss_uform_data
    GROUP BY app_user, app_session, hier_username)
    UNION ALL
    (SELECT app_user, app_session, hier_username,
    HTMLDB_ITEM.hidden (11, hier_code_combination),
    HTMLDB_ITEM.hidden (12, hier_parent_level_number),
    HTMLDB_ITEM.hidden (13, hier_level_type), hier_level_number,
    hier_level_name,
    HTMLDB_ITEM.checkbox (3,
    hier_level_number,
    DECODE (checked, '0', 'UNCHECKED', 'CHECKED') -- replaced NULL with 'UNCHECKED' is the change I made
    FROM wss_uform_data
    WHERE hier_level_type =
    wss_preferences_pkg.get_default_value ('WHOLESALER_LEVEL_TYPE'));

  • Populating apex item checkbox in report row based on database value

    Hi All
    I am looking for help setting an apex item checkbox to 'checked' depending on a record exisiting in a database and I would appreciate a little guidance.
    At the moment I have a report which looks a bit like this
    SELECT licence_user_identifier,
    description,
    licence_name,
    apex_item.checkbox(22,licence_id)
    FROM TABLE(SOL_LICENCE.F_RETRIEVE_ORG_LICENCES ( 121 ));
    4 columns and the last column is a checkbox called 'assign' and is used to assign the selected licence to a user(who is already displayed on the page in another table). There is save button which when clicked saves a record to the database if the checkbox is selected.
    However when the page is displayed the checkbox should be prepopulated/checked if there is a record in the database saying that the licence is assigned to the current user. I have created a page process to try and collect this information and populate the checkboxes on load - before header. However I am having difficulty referencing the apex_application item the corresponds to each row because when I use the FOR i IN 1 .. apex_application.g_f22.COUNT LOOP it only selects the item if it is checked. Can anyone point me in the right direction?
    here is the process I have to populate the checkboxes, it is not getting to my flow.debug as there are no selected checkboxes:-(
    DECLARE
    v_count     NUMBER;
    CURSOR getlicences (p_co_id so05.co_id%TYPE)
         IS
    SELECT     licence_id
    FROM     so05_cust_org_licences
    WHERE     co_id = p_co_id;
    BEGIN
         IF :p9_co_id IS NOT NULL
         THEN
              FOR each_rec IN getlicences (:p9_co_id)
              LOOP
                   --check if a record exists
                   SELECT     COUNT ( * )
                   INTO     v_count
                   FROM     so05_cust_org_licences
                   WHERE     co_id = :p9_co_id AND licence_id = each_rec.licence_id;
    --if the record exists populate the checkbox
                   IF v_count > 0
                   THEN
                        FOR i IN 1 .. apex_application.g_f22.COUNT
                        LOOP
    wwv_flow.debug ('bbbbbbbbbbccccccccccandwearein' || v_count);
                             IF apex_application.g_f22 (i) = each_rec.licence_id
                             THEN
                                  apex_application.g_f22 (i) := 1;
                             END IF;
                        END LOOP;
                   END IF;
              END LOOP;
         END IF;
    END;
    Thanks in advance
    Lynn

    Hi,
    Sorry my mistake. You can use the above link only to solve this problem, for this you have to use a hidden column to which you will assign 'Y' or 'N' as mentioned in that post.
    using that hidden column value you can fire your query accordingly.
    let's say your hidden column is f01 and checkbox column is f02 and the id column is f03, you can do like this
    create a process before your update process like this
    BEGIN
        -- Reset the hidden ADMIN_USER flag for all visible records to N
        -- Note: g_f01 maps to the hidden ADMIN_USER column
        FOR ii IN 1 .. APEX_Application.g_f01.COUNT
        LOOP
            APEX_Application.g_f01(ii) := 'N';
        END LOOP;
        -- Set the hidden ADMIN_USER flag for those records where the
        -- checkbox has been set by the user to Y
        -- Note: g_f02 is the checkbox column ADMIN_USER_CHECKBOX
        FOR ii IN 1 .. APEX_Application.g_f02.COUNT
        LOOP
            APEX_Application.g_f01(APEX_Application.g_f02(ii)) := 'Y';
        END LOOP;
    END;then write a new process positioning after above process
    if apex_application.g_f01 = 'Y' then
      your update query using id column (f03)
    else
      your delete query using that id column (f03)
    end if;hope this helps you.
    Thanks
    Tauceef

  • Apex report performance is very poor with apex_item.checkbox row selector.

    Hi,
    I'm working on a report that includes some functionality to be able to select multiple records for further processing.
    The report is based on a view that contains a couple of hundred thousand records.
    When i make a selection from this view in sqlplus , the performance is acceptable but the apex report based on the same view performes very poorly.
    I've noticed that when i omit the apex_item.checkbox from my report query, performance is on par with sqlplus. (factor 10 or so quicker).
    Explain plan appears to be the same with or without checkbox function in the select.
    My query is:
    select apex_item.checkbox(1,tan_id) Select ,
    brt_id
    , tan_id
    , message_id
    , conversation_id
    , action
    , to_acn_code
    , information
    , brt_created
    , tan_created
    from (SELECT brt.id brt_id, -- view query
    MAX (TAN.id) tan_id,
    brt.message_id,
    brt.conversation_id,
    brt.action,
    TAN.to_acn_code,
    TAN.information,
    brt.created brt_created,
    TAN.created tan_created
    FROM (SELECT brt_id, id, to_acn_code, information, created
    FROM xxcjib_transactions
    WHERE tan_type = 'DELIVER' AND status = 'FINISHED') TAN,
    xxcjib_berichten brt
    WHERE brt.id = TAN.brt_id
    GROUP BY brt.id,
    brt.message_id,
    brt.conversation_id,
    brt.action,
    TAN.to_acn_code,
    TAN.information,
    brt.created,
    TAN.created)
    What could be the reason for the poor performance of the apex report?
    And is there another way to select multiple report records without the apex_item.checkbox function?
    I'm using apex 3.2 on oracle 10g database.
    Thanks,
    Niels Ingen Housz
    Edited by: user11986529 on 19-mrt-2010 4:06

    Thanks for your reply.
    Unfortunately changing the pagination doesnt make much of a difference in this case.
    Without the checkbox the query takes 2 seconds.
    With checkbox it takes well over 30 seconds.
    The second report region on this page based on another view seems to perform reasonably well with or without the checkbox.
    It has about the same number of records but with a different view query.
    There are also a couple of filter items in the where clause of the report queries (same for both reports) based on date and acn_code and both reports have a selectlist item displayed in their regions based on a simple lov. These filter items don't seem to be of influence on the performance.
    I have also recreated the report on a seperate page without any other page items or where clause and the same thing occurs.
    With the checkbox its very very slow (more like 20 times slower).
    Without it , the report performs well.
    And another thing, when i run the page with debug on i don't see the actual report query:
    0.08: show report
    0.08: determine column headings
    0.08: activate sort
    0.08: parse query as: APEX_CMA_ONT
    0.09: print column headings
    0.09: rows loop: 30 row(s)
    and then the region is displayed.
    I am using databaselinks in the views b.t.w
    Edited by: user11986529 on 19-mrt-2010 7:11

  • Loop through checkbox in Oracle APEX 4.2 (using JQuery Mobile)

    Hello!
    I want question text and a report containing the possible answers is shown on a page. An answer can be selected by clicking on the checkbox. After hitting the submit button, the selected checkboxes containing the Answer Text, an answer_id and the current session_id are to be inserted into a table within the database.
    Within Oracle APEX 4.2, I am using a classic report to achieve this. Thich is actually a bad solution, because the checkboxes within the report are shown as simple HTML checkboxes, instead of neat JQueryMobile checkboxes). Anyway, this is my current solution:
    Is use this code for creating the classic report:
    SELECT APEX_ITEM.CHECKBOX(1,answer_id), answer_id, answer_text
    FROM ANSWERS
    WHERE question_ID = :P10_Question_ID;
    The insert of the data is done via the on submit process "On Submit - After Computations and Validations"
    This is the code for the on submit process:
    DECLARE var_session_id NUMBER := :P0_SESSION_ID;
    BEGIN
    FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP
    INSERT INTO STUDENT_ANSWERS (answer_id, answer_text, session_id)
    SELECT a.answer_id, a.answer_text, var_session_id
    FROM ANSWERS a WHERE a.answer_id = APEX_APPLICATION.G_F01(i)
    END LOOP;
    COMMIT;
    END;
    But this solution does not work. Instead, nothing is inserted into the database.
    I don't know why the process is not inserting into the database, maybe there is something wrong with this line here WHERE a.answer_id = APEX_APPLICATION.G_F01(i) ?
    I even tried a simple update process for testing purposes, but this doesnt work either:
    BEGIN
    FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP
    UPDATE STUDENT_ANSWERS SET text = APEX_APPLICATION.G_F03(APEX_APPLICATION.G_F01(i))
    WHERE am_id = APEX_APPLICATION.G_F02(APEX_APPLICATION.G_F01(i));
    END LOOP;
    COMMIT;
    END;
    Can anybody tell me how to loop through a checkbox within ORACLE APEX 4.2 and how to insert the values ANSWER_ID, ANSWER_TEXT and SESSION_ID into the table STUDENT_ANSWERS after hitting the submit button? If you would know how to do it without using a report but a simple checkbox, this would be even more helpful for me!

    I would start by putting this after submit, to check the contents of the array.
    apex_debug.message('count:'||apex_application.g_f01.COUNT);
    FOR i IN 1..apex_application.g_f01.COUNT LOOP
        apex_debug.message('i:'||i||':'||apex_application.g_f01(i));
    END LOOP;
    Then compare the contents with your answers table.

  • Checkbox Item: character string buffer too small (APEX 4.0. - 4.2.)

    Hi all,
    I'm currently running the Oracle Application Express 4.0.2 on the Oracle DB 11g and thinking about the APEX upgrading to current 4.2. version. We have there quite big application used by the inernal employees so prior I need to test, if the migration will work.
    I installed the new server with database and the APEX 4.2. and import the current application. Everything seems to working good except few checkboxes, which returns me the error: "ORA-06502: PL/SQL: numeric or value error: character string buffer too small."
    LOV (Source) Code of Checkbox Item:
    SELECT email as display_value, id as return_value
    FROM users
    WHERE <some conditions>;
    In the current version 4.0.2. I get the checkbox item (total count of the rows approx. 650), but in the 4.2. I get this "string buffer too small" error and the page could not be rendered (if I add to the same query limitation: "rownum<242" it will display the item).
    Could you please help me with this issue? Any idea, what I should set up in the new APEX to get the same results or you see there any limitation, why it does not work in the new version, but in the old version the same SQL works fine?
    Thank you all in advance.
    Regards,
    Tomas.

    1007462 wrote:
    Hi all,Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your forum profile with a real handle instead of "1007462".
    I'm currently running the Oracle Application Express 4.0.2 on the Oracle DB 11g and thinking about the APEX upgrading to current 4.2. version. We have there quite big application used by the inernal employees so prior I need to test, if the migration will work.
    I installed the new server with database and the APEX 4.2. and import the current application. Everything seems to working good except few checkboxes, which returns me the error: "ORA-06502: PL/SQL: numeric or value error: character string buffer too small."
    LOV (Source) Code of Checkbox Item:
    SELECT email as display_value, id as return_value
    FROM users
    WHERE <some conditions>;
    In the current version 4.0.2. I get the checkbox item (total count of the rows approx. 650), but in the 4.2. I get this "string buffer too small" error and the page could not be rendered (if I add to the same query limitation: "rownum<242" it will display the item).
    Could you please help me with this issue? Any idea, what I should set up in the new APEX to get the same results or you see there any limitation, why it does not work in the new version, but in the old version the same SQL works fine?The total size of the HTML generated for an LOV-based item in APEX is restricted to 32K (this limit applies to every version). Why you are hitting this limit in the new instance may be due to differences in data or the database configuration (e.g. character set) rather than changes introduced in APEX.
    Is the data exactly the same? Is the database configuration the same? When you limit the number of rows so the checkboxes are displayed and view the page source, is there any difference in the HTML used to render the checkbox form elements between the two versions?
    That said, from a usability perspective 650 LOV options is rather a lot, and your application may very well outgrow this limit naturally in any version of APEX as more users as added. It is probably worthwhile thinking about other ways to display these options.

  • To get values as checked or unchecked from databse to apex checkbox

    Hi gurus
    apex 4
    oracle 11g
    how to load data from database for check box if values =1 then checked and id value=0 then unchecked .
    can you please help me to solve this issue
    Sample table
    En0 empname pack1 pack2 pack3 pack4
    1 a 1 0 0 1
    2 b 0 1 0 0
    3 c 1 1 1 1
    4 d 0 1 1 0
    my output in APEX should shows that for ename 1
    Check box pack1 checked
    checkbox paCK2 unchecked
    checkbox pack3 unchecked
    checkbox pack4 checked
    and im the new user in apex so can u help
    Thanks in advance
    r
    Edited by: A on Apr 13, 2011 7:26 PM

    Please some patience!
    For a standard report, your SQL would look like this:
    SELECT eno,
           empname,
           apex_item.Checkbox(1, pack1, Decode(pack1, 1, 'CHECKED', NULL)) AS pack1,
           apex_item.Checkbox(1, pack2, Decode(pack1, 1, 'CHECKED', NULL)) AS pack2,
           apex_item.Checkbox(1, pack1, Decode(pack3, 1, 'CHECKED', NULL)) AS pack3,
           apex_item.Checkbox(1, pack1, Decode(pack4, 1, 'CHECKED', NULL)) AS pack4
    FROM   sample_tbl  Under column Attributes, make sure your checkbox columns are displayed as Standard Report Column
    Jeff

  • Inserting checkbox into a APEX select list

    After aloooottt of time spend in google and script foruns, i found a way to transform the simple APEX select list into a multiselec combobox with checkbox inside. Its working prety cool, and its not so hard to implement.
    I´m sry if someone alread post it before, but, due to the time spend it on it, i know that is a bit hard to found.
    If someone is looking for that too, i can share all my work into this. I will be glad to help.
    just send me a email [email protected] or ask here on forum.
    Tnks to all who help me on this "quest" lol.

    Good to hear. If you have an account on apex.oracle.com you can put your demo there for everybody to see. If not, just create an account.

Maybe you are looking for