Storing and Fetching checkbox values in APEX 4.0

Hi,
I am trying to store and fetch values of multiple checkboxes which i have created as items inside multiple regions.
What could be the most efficient way to store the checkbox state values in the database table, when creating a new record in my application and to show the checkbox state by fetching the state value,when viewing an already created record??
Thanks.

Yes, the list is presented as items.
I have got the list of values using a SQL queries for different regions and i have presented the output in the form of checkboxes.
I am trying to store the values of checkboxes from multiple regions inside database along with other details of form.
Also, i want to fetch the stored values and view them for already created records.
My exact question would be that which API or feature is used to achieve this in APEX 4.0 and how can it be done successfully??
Thanks.

Similar Messages

  • Storing and retrieving multiple values into one cookie.

    Hi Everyone,
    I am wondering if anybody knows of any good tutorials involving storing multiple values into one cookie. Any URLs will be greatly apprecated. Thanks heaps.
    Regards
    Davo

    These are normally delimted in HTTP by a semicolon. You can concatenate the string yourself and on the reverse trip use StringTokenizer to get the values back out.
    - Saish

  • Storing and loading global values in JVM...

    Is it possible to store and then read global values from the JVM? If it is possible, could please give me the code fragmant to do this or direct me to some place where I can read more about this.
    Thanks.
    -PV

    You are correct. Although global variables aren't usually good for OOP, I think this is an exception. I have a singleton class which requires DB access. The problem is that I don't want to hardcode the DB properties or the path to the property file. The class isn't a servlet, so I can't get the info out of the configuration file. Instead, I'm loading it into the JVM that way I have access to the data whenever I need it. Although I have to hardcode the name of the file, I don't have to hardcode the path which serves my purpose well. If there is another solution, please don't hesitate to share your idea(s) with me.
    Thanks.
    -PV

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Problem with checkbox value and app.settings.getSetting()

    Hello everyone.
    I`ve got a problem with getting saved settings for checkbox.
    Saved settings doesn`t apply on checkbox value.
    It`s strange, but it always "true".
    So here piece of code:
    checkMe = 11;    //any value for the first time running
    if (app.settings.haveSetting("savea", "chck")) {                           
                          checkMe = app.settings.getSetting("savea", "chck");  // get saved value, else 11
                          alert("checkMe = "+checkMe)
                        if(checkMe == 11){
                            checkMe= false;   //if there is no saved settings, checkbox value will be false/ unchecked
                            alert("You run this script first time, so manual value will be 'false'")
                            }else{
                                checkMe = app.settings.getSetting("savea", "chck");     // if saved settings exist, get true or false
         alert("Yes, checkMe will = "+checkMe)       
    win.checkPanel.chkOne.value = checkMe;  /// checkbox value will equal saved checkMe
    var fff = win.checkPanel.chkOne.value;  // string for alert
    alert("aha! but checkbox value is  = " +fff+ "\n Why so?")     // here we`ve got always "true"
    win.checkPanel.chkOne.onClick  = function () {
        var path11 = win.checkPanel.chkOne.value;  //  checkbox value to variable
        app.settings.saveSetting("savea", "chck", path11);  //saving checkbox value
        alert("Saved this value - " + app.settings.getSetting("savea", "chck"))
    win.checkPanel.chkOne.value is always true.
    Can someone exmplain why and how to get rid of this static value?
    P.S. just in case, here is full code:
    function mainFun()
        this.windowRef = null;
    mainFun.prototype.run = function()
        /*----- UI -----*/
              var retval = true;
              var win = new Window("palette", "Check option", [150, 150, 460, 455]);
              this.windowRef = win;
              win.checkPanel = win.add("panel", [25, 150, 285, 265], "Checkbox");
              win.checkPanel.chkOne = win.checkPanel.add("checkbox", [10, 15, 125, 35], "Checkbox One");
              //win.checkPanel.chkTxtOne = win.checkPanel.add('edittext', [140, 15, 230, 35], '');
         win.quitBtn = win.add("button", [110,275,200,295], "Close");
    checkMe = 11;    //any value for the first time running
    if (app.settings.haveSetting("savea", "chck")) {                           
                          checkMe = app.settings.getSetting("savea", "chck");  // get saved value, else 11
                          alert("checkMe = "+checkMe)
                        if(checkMe == 11){
                            checkMe= false;   //if there is no saved settings, checkbox value will be false/ unchecked
                            alert("You run this script first time, so manual value will be 'false'")
                            }else{
                                checkMe = app.settings.getSetting("savea", "chck");     // if saved settings exist, get true or false
         alert("Yes, checkMe will = "+checkMe)       
    win.checkPanel.chkOne.value = checkMe;  /// checkbox value will equal saved checkMe
    var fff = win.checkPanel.chkOne.value;  // string for alert
    alert("aha! but checkbox value is  = " +fff+ "\n Why so?")     // here we`ve got always "true"
    win.checkPanel.chkOne.onClick  = function () {
        var path11 = win.checkPanel.chkOne.value;  //  checkbox value to variable
        app.settings.saveSetting("savea", "chck", path11);  //saving checkbox value
        alert("Saved this value - " + app.settings.getSetting("savea", "chck"))
              win.quitBtn.onClick = function() {
                  win.close();
        win.center();
              win.show();
              return retval;
    if(typeof(mainFun_unitTest) == "undefined") {
        new mainFun().run();

    Played around with different values, combinations...
    Doesn`t work too:
    checkMe = 111;    //any value for the first time running
    if (app.settings.haveSetting("333", "check")) {                           
                          checkMe = app.settings.getSetting("333", "check");
    alert(checkMe);
                    if(checkMe == 111){
                             win.checkPanel.chkOne.value= false;
                            }else{
                                if (checkMe != false){
                                win.checkPanel.chkOne.value= true;
                                }else{
                                win.checkPanel.chkOne.value= false;
    win.checkPanel.chkOne.onClick  = function () {
        var path11 = win.checkPanel.chkOne.value;
        var path12 = path11.toString();
        app.settings.saveSetting("333", "check", path12);
        alert("Saved value - " + app.settings.getSetting("333", "check"))

  • How to fetch Junk values and its columns dynamically

    Hello,
    Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..
    Thanks in advance..

    Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..1. define "junk" values.
    2. usually it does not matter what values are in ID, because it is used internally by application, to maintain uniqueness or relations, not having any semantical meaning. End users usually should not see IDs, such IDs are generated automatically. There is no need to cleanse them from "junk" values.
    3. If you made a typo, and you are looking for "junk" values in Name column, it is a different story. You can use TRANSLATE to search such values, as already advised, translating all "junk" characters to one "junk" character and searching for the latter.
    select id, name from T where translate(name,'?@#$%^<>','~~~~~~~~~') like '%~%';
    Edited by: Mark Malakanov (user11181920) on Jan 4, 2013 11:40 AM

  • Oracle stored procedure in PHP fetching XML values

    Hi,
    I have the below table created in oracle
    CREATE TABLE TEST_XML(
    ID NUMBER(5),
    DATA VARCHAR2(4000)
    INSERT INTO TEST_XML VALUES(100,'<student><name>Ruck</name><id>1</id></student>');
    I have created a procedure:
    CREATE OR REPLACE PROCEDURE SP_TEST_XML
    ( ID IN NUMBER,
    DATA OUT VARCHAR2
    IS
    -- local variables
    v_ID      NUMBER(5);
    v_DATA VARCHAR2(4000);
    BEGIN
         v_ID := ID;
    SELECT     DATA
         INTO     v_DATA
         FROM      TEST_XML
         WHERE     ID = v_ID;
         DATA := v_DATA;
    EXCEPTION
    WHEN OTHERS THEN
         DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END;
    When i run the below block in sqlplus:
    DECLARE
    a VARCHAR2(4000);
    BEGIN
    SP_TEST_XML(100,a);
    DBMS_OUTPUT.PUT_LINE('The value is: ' || a);
    EXCEPTION
    WHEN OTHERS THEN
         DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END;
    I get the below output:
    'The value is: <student><name>Ruck</name><id>1</id></student>
    But i tried to call the same procedure and fetch the data value using below php code:
    <?php
    $conn = OCILogon("username", "password", "dbhost");
    $sql = 'BEGIN SP_TEST_XML(:ID, :DATA); END;';
    $stmt = OCIParse($conn,$sql);
    //Bind the input parameters
    $p = OCIBindByName($stmt,':ID',$ID,5);
    // Bind the output parameter
    $q = OCIBindByName($stmt,':DATA',$DATA,4000);
    // Assign values to input parameters
    $ID = 100;
    OCIExecute($stmt);
    echo " Data = $DATA <br>";
    OCIFreeStatement($stmt);
    OCILogoff($conn);
    ?>
    I get the following result : Ruck1
    Why is the complete string not outputed?why are tags eliminated from output?
    only the values are concatenated and returned?
    Pls help me.
    Thanks.
    srinath.

    Hi, I have the below table created in oracle
    CREATE TABLE TEST_XML(
    ID NUMBER(5),
    DATA VARCHAR2(4000) );
    INSERT INTO TEST_XML VALUES(100,'<student><name>Ruck</name><id>1</id></student>');
    I have created a procedure:
    CREATE OR REPLACE PROCEDURE SP_TEST_XML
    ( ID IN NUMBER, DATA OUT VARCHAR2 )
    IS -- local variables v_ID NUMBER(5); v_DATA VARCHAR2(4000);
    BEGIN
    v_ID := ID;
    SELECT DATA INTO v_DATA FROM TEST_XML WHERE ID = v_ID;
    DATA := v_DATA;
    EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE(SQLERRM); END; /
    When i run the below block in sqlplus:
    DECLARE a VARCHAR2(4000);
    BEGIN SP_TEST_XML(100,a);
    DBMS_OUTPUT.PUT_LINE('The value is: ' || a);
    EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE(SQLERRM); END; /
    I get the below output: 'The value is: <student><name>Ruck</name><id>1</id></student>
    But i tried to call the same procedure and fetch the data value using below php code:
    <?php $conn = OCILogon("username", "password", "dbhost");
    $sql = 'BEGIN SP_TEST_XML(:ID, :DATA); END;';
    $stmt = OCIParse($conn,$sql);
    //Bind the input parameters $p = OCIBindByName($stmt,':ID',$ID,5);
    // Bind the output parameter $q = OCIBindByName($stmt,':DATA',$DATA,4000);
    // Assign values to input parameters $ID = 100;
    OCIExecute($stmt); echo " Data = $DATA
    "; OCIFreeStatement($stmt); OCILogoff($conn); ?>
    I get the following result : Ruck1
    Why is the complete string not outputed?why are tags eliminated from output? only the values are concatenated and returned? Pls help me. Thanks. srinath.

  • Trying to fetch a value in a java function and returning the array.

    hello....I am trying to fetch a value in a java function and returning a array......I already write the pl/sql function which is working fine....but i think i m lost......when i run it through the jsp it shows me error........pls help
    java code:=
    public String [] viewx(String bid) throws SQLException, Exception {
    String [] values;
    try {
    CallableStatement cstmt = null;
    String SQL = "{?=call vi_dis.v_dis(?)}";
    cstmt = con.prepareCall(SQL);
    cstmt.registerOutParameter(1,Types.ARRAY);
    cstmt.setString(2, bid);
    cstmt.execute();
    Array simpleArray = cstmt.getArray(1);
    values = (String [])simpleArray.getArray();
    cstmt.close();
    } catch (SQLException sqle) {
    error = "SQLException: Could not execute the query.";
    throw new SQLException(error);
    } catch (Exception e) {
    error = "An exception occured while retrieving emp.";
    throw new Exception(error);
    return values;
    pl/sql function
    create or replace package vi_dis
    as
    function v_dis(vbid IN student.bid%type) return stuarray ;
    end;
    create or replace
    package body vi_dis
    as
    function v_dis(vbid IN student.bid%type) return stuarray
    is
    l_stu stUarray :=stuarray();
    cursor c_sel
    is
    SELECT CNAME
    FROM COURSE C,ENROLL E
    WHERE C.CID=E.CID
    AND E.BID=vbid;
    BEGIN
    OPEN c_sel;
    FETCH c_sel BULK COLLECT INTO l_stu;
    l_stu.extend;
    CLOSE c_sel;
    RETURN l_stu;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN DBMS_OUTPUT.PUT_LINE('NO RESULT AVAILABLE');
    CLOSE c_sel;
    END;
    END;
    /

    BalusC wrote:
    It is comparing the selected value against the List<SelectItem> returned by getSetoresOrigem() as it is during the apply request values phase of the form submit request.Ok. That's what I supposed JSF was doing.
    BalusC wrote:
    If the selected value isn't in there, then you will get this error.I can understand this, but is this right? As I said, the old value isn't really there because I changed the list values to new ones. But the new value (the value of fSetorOrigem ) corresponds to a value that exist in the new list items, so a valid value. So JSF is not considering that I also changed the list, not just the value. It is comparing the new value with the old list, not the new one. Acting like this JSF is making the page looks like a static HTML page, not a dynamic one. If I can't change the list and the value, what's the point of that? In my point of view I'm not doing anything wrong, I'm not violating any JSF rules.
    Marcos

  • Fetch table value in BEX Web report using Javascripts, and assign condition

    Hi Gurus,
    I am currently using WAD 3.5. I need to change the web report to behave like below :-
    1. Default layout (Field A B C) with condition A & B activated.
    2. If the drilldown Field B and C is removed, leaving only field B alone in the report drilldown, deactivate condition A & B, Activate condition C & D.
    3. the above can be reversed where user drilldown field B & C into the layout, the condition A & B need to then be activated back.
    So I believe this can be done using Javascript. So my questions are below
    1.) How do i fetch table value for the navigationblock ? with navigationblock i am able to know what are the columns are in the drilldown (i will not display free characteristics, so ignore this part). how do i read the content of NAVIGATIONBLOCK_1 as shown in following code? using javascript.
    <P><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="NAVIGATIONBLOCK_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_NAV_BLOCK"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="SHOW_FREE_CHARACTERISTICS" value=""/>
             <param name="SHOW_NAVIGATION_ICONS" value=""/>
             <param name="SHOW_FILTER_ICONS" value=""/>
             ITEM:            NAVIGATIONBLOCK_1
    </object></P>
    2.) After question 1.) is done, please advice how do i activate/deactivate the conditions? based on the fields found in above. Maybe I can use IF navigationblock_1 contain field A only, then set condition A & B , etc.
    <p><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="CONDITIONLIST_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_CONDITION"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             ITEM:            CONDITIONLIST_1
    </object>
    I would appreciate if we can solve Question 1 first before proceed to 2.)
    Please advise. Thanks

    Hi JTi,
    what i have understood from your requirement is that you want to access the web item table_1 in javascript, you can get that as below:
    Add
    <span> 
    tag before your web item and set its id to table.
    <span id = "table">
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="GET_ITEM"/>
    <param name="NAME" value="TABLE_1"/>
    <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
    <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
    <param name="GENERATE_CAPTION" value=""/>
    <param name="CAPTION" value="jezel"/>
    <param name="ONLY_HIERARCHY_NAVIGATION" value="X"/>
    <param name="BLOCK_SIZE" value="0"/>
    <param name="SHOW_PAGING_AREA_BOTTOM" value=""/>
    ITEM: TABLE_1
    </span>
    In javascript access it as :
    var mytable = document.getElementsById("table");
    Hope this helps
    Thanks
    Dipika

  • Classic Report - report error:ORA-20001: Error fetching column value

    Hi,
    In Apex 4 I have created an SQL report which errors with ORA-20001: Error fetching column value: ORA-01403: no data found.
    It works fine if I hard code the start and end dates but fails when I use page items as parameters.
    I call a stored function as below:
    DECLARE
    l_sql VARCHAR2(4000);
    BEGIN
    SELECT ICDB_PCT_MRSA_POS_REP(v('P40_NEWSTARTDATE'),
    v('P40_NEWENDDATE'))
    INTO l_sql
    FROM dual;
    RETURN(l_sql);
    END;
    although I have used the :P40_NEWSTARTDATE form too, with the same result.
    Any suggestions will be welcome.
    Thanks,
    Chris

    Hi Chris,
    have you debugged if ICDB_PCT_MRSA_POS_REP is raising the no-data-found error or if it's the actual SQL statement which got returned?
    Comment out the call to ICDB_PCT_MRSA_POS_REP and return a hard coded SQL statement with
    return 'select [... here comes a sample sql statement returned by ICDB_PCT_MRSA_POS_REP]';to rule out that ICDB_PCT_MRSA_POS_REP is raising the error.
    BTW what is the purpose of the select from dual? Just call the ICDB_PCT_MRSA_POS_REP directly like
    return ICDB_PCT_MRSA_POS_REP(:P40_NEWSTARTDATE, :P40_NEWENDDATE);Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

  • How to write a checkbox value in items

    Hi there,
    is there a way to write a value belonging to a checkbox in an item? [apex 4.2]
    Lets say I have the following statement :
    SELECT TRUNC (SYSDATE, 'MON')+rownum-1 as DAYS
    FROM DUAL
    CONNECT BY LEVEL <= 31
    Now I want to add a checkbox and this checkbox should write all checked values in a Page Item called P5_DAYS
    And I want that these values are deleted if the checkbox is unselected.
    Is there a way to do this (maybe without jquery?). Does Apex 4.2 has some built in features to handle this?

    I've used few (if any) plug-ins so I'm helpless there. If this were a simple page item like P3_POSITION, then if the page is submitted so P3_POSITION has a value, that value can be referenced on any page as :P3_POSITION (or &P3_POSITION. (include period)).
    To clarify, the value is stored in the session when the page is submitted. If you can't submit the page because you don't want all the values updated int he session than there are ways to submit the value of selected items.
    Is that what you want to know?
    Howard

  • Place default checkbox value "in SESSION" on initial page load

    Oracle 11.2
    Apex 4.1
    Desire outcome: Chart renders on inital page load using default value of checkbox in query.
    I have a checkbox with a default (checked) value. It shows checked when the page renders for the first time but the value is not in the SESSION state. I use this value in a query for a chart. I do not want to use a Submit button so I have a dynamic action submitting the value for the checkbox and the chart refreshes as desired when I check and uncheck the box.
    I tried "Fire on Page Load" in the DA Execution Options, as well, but that caused a loop where the page renders and immmediately renders, and immediately renders, etc.
    Is there a declarative solution that submits the current, in this case default, values when the page is loaded? I only need and want the default values used the first time the page is accessed. This is the initial page of the application but I need the same behavior on all pages for the separate checkbox selections found there.
    May God Bless,
    Howard

    Howard (DBA in Training) wrote:
    If I remove the Default Value and add a Before Header page computation for the item with static assignment to
    a:bI get the 2 A/B checkboxes, both checked, and the value is set in session state.If you log in here, you can see it up close and personal!
    http://apex.oracle.com/pls/apex/f?p=21997:3 Login: Dever / Ima9Dever
    The Default Value colon-delimited string must contain the checkbox values, not the labels. In a static LOV the checkbox options are specified as <tt>label;value</tt> pairs. Thus in your checkbox LOV the labels are A/B, whilst the values are a/b. The values are case-sensitive.
    The Default Value should therefore be:
    a:bwhereas you've specified:
    A:BWith the checkbox item LOV Display Extra Values property set to Yes, APEX displays these extra values that are not included in the LOV definition as additional checkboxes. You can see this if you inspect the rendered checkbox elements in the HTML source:
    <input type="checkbox" id="P3_CHECKBOX_0" name="p_v01" value="a">
    <input type="checkbox" id="P3_CHECKBOX_1" name="p_v01" value="b">
    <input type="checkbox" id="P3_CHECKBOX_2" name="p_v01" value="A" checked="checked">
    <input type="checkbox" id="P3_CHECKBOX_3" name="p_v01" value="B" checked="checked">You get the a/b values defined in the LOV, plus the extra A/B values the LOV knows nothing about.
    ==== ) How do you keep it from setting/resetting these values each time the
    page is rendered?  The need is to do it only the very first time?  ( ====Put a Value of Item / Column in Expression 1 Is NULL condition on the Computation. Problem then is that the computation will be run if the user can [legitimately] deselect all of the checkboxes, either leaving you back where you started, or requiring the use of a further item to flag whether it is the really "the very first time" (which I find intellectually deeply unsatisfactory). This may be a sign that the control should really be a radio group that always has one option set, rather than a check box.

  • 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.

  • Use of bar code value in apex

    Hi experts,
    I am building an employee attendance system in apex.
    When an employee enters or leave the office, the bar code reader captures the value (i.e employee id) based on the bar code sticker on employee i-card. So after getting the employee id, I want that value in first item on apex form.
    Based on this value a function/procedure should be called which stores employee details (e.g. name, date, time etc) into the table without any manual interaction. Also the value of item should be null/clear after entry in table.
    I tried it using windows hooks, but it is not working properly. (e.g. It doesn't fetch the value when computer is locked.)
    Is it possible to fetch the value ( employee id) directly into the form item and at the same time insert the values in the database based on the employee id...???
    This is just an general overview of how it want to be work. Please provide your valuable suggestions for any other way to implement the same.
    Thanks in advance
    Chetan

    I assume you are just using a generic bar code reader that effectivly acts like a keyboard typing the relevant bar code value?
    I really don't think APEX is the right environment to be doing this sort of thing in.
    Unless I've misunderstood the hardware you are using though I really think you are going to struggle getting enything to happen when the machine is locked...

  • How to Set CheckBox values in Before Headr Process

    In my Before Header process I read a database table that contains a code field that I would like to use to have my checkbox values checked if the field contains one of the values.
    Example the database file my have "LWR"
    On the form the Check box is
    L - For Loading
    W - For Waiting
    R - Relase
    P - Posted
    J - Job
    .....etc
    So when I read the record for my above example I would like L, W, and R checked.
    What is the best method to do this?
    THanks.

    Are you storing the values with their ":" separators (like 'L:W:R')?  If so, the checkbox code does the transformation logic.  In which case, there is no need to code insertion of the : when populating the checkbox.  No need to remove them before saving the values.
    Howard

Maybe you are looking for

  • HP Officejet Pro 8500 A909g - doesn't install on Windows 8

    I upgraded my HP computer to Windows 8 Pro from Windows 7.The HP Officejet Pro 8500 A909g was running fine with Windows 7, but will not install correctly  on Windows 8 Pro. I've tried reinstalling numerous times. Sometimes the installation appears to

  • My InDesign file keeps failing to export to PDF

    I can't understand why my file won't export as a PDF.  My printer needs my file to be a PDF.

  • Missing destination region in veo1

    In ve01 destination region is missed and veiav table not getting update with destination region. and ve01 log is shown as: incomplete - please maintain FT data for the document what could be the reason here 'export' we are using in VE01 for intrasat

  • Vi question

    When i type "vi" at the console some welcome screen appears,and I can't start immediately to write text, even when I press esc to go out from command mode, again nothing appears on screen when I type.. I know that In the beggining I can issue "vi tex

  • I have already asked this question but can't find it

    Hello I used to be able on Mozilla to listen on-line to all of the BBC radio stations via their website but in about February of this year it has just stopped .....I click on their listen again facility the way I used to but nothing happens it is rea