Checkbox to collection

Hi,
I am creating a report, with a generated checkbox on each row.
HTMLDB_ITEM.CHECKBOX(1,icv_id) add_record
Now I want to verify these checkboxes after submit. If they are checked I want to add them in a collection. Does someone know how to do this?
Regards

thanks this works.
Using javascript I store the seq_id and the checked value in 2 page items
$s('P70_SEQ_ID', $(this.triggeringElement).val() );
$s('P70_CHECKED', $(this.triggeringElement.checked).val() );The checked value I get is <empty> when checked and 'undefined' when unchecked. Based on this I can now update the collection.
declare
  l_selectie varchar2(1);
begin
  if v('P70_CHECKED')='undefined'
  then
    l_selectie := 'N';
  else
    l_selectie := 'J';
  end if;
  apex_collection.update_member_attribute(p_collection_name => 'CONCOLLECTION'
                                             ,p_seq             => v('P70_SEQ_ID')
                                             ,p_attr_number     => 3
                                             ,p_attr_value      => l_selectie);
end;

Similar Messages

  • Report with checkbox and collection

    Hi all
    I need to manage an interactive report to filtering and selecting rows by checkboxes and then use a collection to manage the selected records.
    I used a first collection to create the source record set by a On-Load Before-Header Process:
    DECLARE
    v_id NUMBER;
    var1 Varchar2(8);
    var2 Varchar2(10);
    var3 VARCHAR2(50);
    var4 VARCHAR2(10);
    var5 VARCHAR2(100);
    var6 VARCHAR2(5);
    cursor c_Populate is
    SELECT
    dep.chassis_code AS chassis_code,
    dep.model_code AS model_code,
    m.model_description AS model_description,
    dep.acc_doc_number AS acc_doc_number,
    dest.description AS destination_descr,
    (trunc(sysdate) - dep.entry_date) Anzianita
    FROM deposit_chassis dep, warehouses w, warehouse_map map, models m, site s,
    destinations dest, T_SUB_DESTIN_DEALERS sdd
    WHERE
    dep.status = 5 AND
    w.ware_code = map.ware_code AND
    dep.DEALER_CODE = sdd.DELIVERY_POINT AND
    dep.DESTINATION_CODE = sdd.DESTINATION_CODE AND
    map.map_code = dep.map_code AND
    m.model_code = dep.model_code AND
    DEP.UNLOADING_SITE = S.SITE_CODE AND
    DEP.destination_code = dest.destination_code And
    dep.unloading_site = 'S0000074' and w.site_code = 'S0000074';
    i NUMBER;
    BEGIN
    APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION(p_collection_name => 'MY_COLLECTION');
    OPEN c_Populate;
    LOOP
    FETCH c_Populate into var1, var2, var3, var4, var5, var6;
    EXIT WHEN c_Populate%NOTFOUND;
    APEX_COLLECTION.ADD_MEMBER(
    p_collection_name => 'MY_COLLECTION',
    p_c001 => var1,
    p_c002 => var2,
    p_c003 => var3,
    p_c004 => var4,
    p_c005 => var5,
    p_c006 => var6);
    END LOOP;
    CLOSE c_Populate;
    END;
    Then I created a region for a SQL report:
    SELECT
    APEX_ITEM.CHECKBOX(1,c001) Chk,
    apex_item.text(2, c001) Telaio,
    apex_item.text(3, c002) ModelCode,
    apex_item.text(4, c003) Model,
    apex_item.text(5, c004) Doc_Number,
    apex_item.text(6, c005) Destination,
    apex_item.text(7, c006) Age
    FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = 'MY_COLLECTION';
    Then, with a submit button and the relative process (below), I need to load a new collection for further elaboration.
    How can I obtain the single values for each field of my selected row (see MY_COLLECTION) ?
    APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION(p_collection_name => 'COL_AVAILABLE_CHASSIS');
    FOR i IN 1..APEX_APPLICATION.G_F01.Count
    LOOP
    APEX_COLLECTION.ADD_MEMBER(
    p_collection_name => 'COL_AVAILABLE_CHASSIS',
    p_c001 => I need the Telaio
    p_c002 => I need the ModelCode
    p_c003 => I need the Model
    p_c004 => I need the Doc_Number
    p_c005 => I need the Destination
    p_c006 => I need the Age
    END LOOP;
    Thanks in advance,
    Massimo

    Dear Jari
    I've looked at your sample.
    Yes it seems ok for my apps
    So, i've done the following update to my code:
    Souce Report
    SELECT
         APEX_ITEM.CHECKBOX(3,c001) Chk,
         APEX_ITEM.TEXT(4,c001) Telaio,
         APEX_ITEM.TEXT(5,c002) ModelCode,
         APEX_ITEM.TEXT(6,c003) Model,
         APEX_ITEM.TEXT(7,c004) Doc_Number,
         APEX_ITEM.TEXT(8,c005) Destination,
         APEX_ITEM.TEXT(9,c006) Anzianita
    FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = 'MY_COLLECTION'
    The Submit Process
    DECLARE
      l_row NUMBER := 1;
    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_F03.COUNT
      LOOP
        FOR j IN l_row..APEX_APPLICATION.G_F04.COUNT
        LOOP
          IF APEX_APPLICATION.G_F04(j) = APEX_APPLICATION.G_F03(i) THEN
              -- ONLY FOR TEST PURPOSE --
            htp.p('Telaio: '||APEX_APPLICATION.G_F03(i));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F04(j));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F05(j));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F06(j));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F07(j));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F08(j));
            htp.p('Campo: ' ||APEX_APPLICATION.G_F09(j));
            l_row := j + 1;
            EXIT;
          END IF;
        END LOOP;
      END LOOP;
      COMMIT;
    END;
    Is it correct to manage G_F0x like my code ?
    Thanks,
    Massimo

  • How to show a table in Excel as it is.. in Siena? PLZZ ANSWER!

    My Excel sheet has a table named 'Compliance' with 5 columns....'S. No.' , 'Specifications', ....(so on).... , 'Remarks' and data entered in rows.
    Now.. I want to show this table as it is in my Siena App. How do I do this??
    Also.. I want to add another column(6th) in the app which contains checkboxes ...such that I can Check some of the rows (from Compliance table in app) I want, and add them to a separate Collection that can be viewed on another screen.
    Please Help!!!!

    Just a quick example if needed.
    Create a Custom Gallery (Visuals < Galleries < Custom Gallery (choose the one on the right).
    Move the Gallery to wherever you want it on the page.
    Change the following:
    Design < Template Size: 40
    Design < Template Padding: 5
    Data < Items: Compliance
    Assuming you selected the Custom Gallery on thr right, Template Size refers to the height of the Template, I just used 40 as a quick example.
    The Temnplate Padding refers to the empty space between each template, and the space between the templates and the Gallery.
    Click inside the top template on the Gallery:
    Add a Label: Visuals < Label
    Set its Text to 'S. No.'
    Data < Text: ThisItem!'S. No.'
    Assuming you clicked inside the top template in the Gallery, you will see the lable repeated in each of the templates below it.   If it didn't, delete it, then re click inside the template, ad add it.
    Adjust the width of the label to the widest useage expected, as it will not grow automatically.
    Add another Label: Visuals < Label
    Set its Text to Specifications
    Data < Text: ThisItem!Specifications
    Notice the difference between the two data sources.  Since S. No contains a space, you have to put a set of ' around it.   The other does not have a space, so it soesn't use the '
    Drag the Label to the right of the first label.
    Repeat for the remaining fields.
    After all of the fields are in the Gallery, add a CheckBox:
    Visuals < CheckBox
    Change the text next to the TextBox with its Text property.
    To use the CheckBox to Collect that specific record to Collection2, use:
    Behavior < OnChecked: Collect(Collection2, ThisItem)
    It is usually usefull to also remove the item if UnChecked:
    Behavior < OnUnChecked: Remove(Collection2, ThisItem)
    -Bruton

  • How to delete a selected row from datagrid and how to create a datagrid popup

    hi friends,
                  I am new to flex.i am doing a flex4 application,i need help for this.
                i am having a data grid with columns.i have two questions.
               Ques 1: when  i selected a partiuclar row from a datagrid and click delete button  means that record will delete from the datagrid and DTO from the cloud  tables also.
                Ques 2: when i save  the data grid values using save button means that data will store in  respective cloud DTO which is related to the datagrid,
                     My requirement is i am using a search button when i click the search  button it will show a datagrid that datagrid will contain the previous  datagrid datas which is saved in the cloud.
    REQUIREMENT example: first screen:           i am using with data grid 3 columns (Student Roll number ,Student Name,Student pecentage)---->save--->data will store in cloud DTO.
    Second screen:                search button ----> it need show  datagrid popup.it will have data which we saved in the first screen with same columns(Student Roll number ,Student Name,Student pecentage).
    This is my requirement.
    Any suggession welcome.
    Thanks in advance.
    B.Venkatesan

    Lets break the problem statement in multiple steps
    1. We need a way to know the selection on all rows.
    2. We need the association of the checkBox with the data
    The  solution is to use a arrayCollection/array that holds all the instances  created for checkbox.This collection should be a property of component  containing the datagrid. We need to use a custom component  implementation or inline ItemRenderer. The way you have used is called  dropinItemRenderer. Preferaly use custom component implementation and  add the instance to the arrayCollection at CreationComplete. Make sure  you use addItemAt so that you add the instance in the same row as the  data. To get rowIndex the custom Checkbox should implement  IDropInListItemRenderer. You could iterate this collection to check all  the instances that are checked.
    Note: This is the approach considering your dataprovider doesnt have a selection field.
    Nishant

  • How to delete a Selected row from datagrid and how to create a datagrid popup with saved values

    hi friends,
                  I am new to flex.i am doing a flex4 application,i need help for this.
                i am having a data grid with columns.i have two questions.
               Ques 1: when i selected a partiuclar row from a datagrid and click delete button means that record will delete from the datagrid and DTO from the cloud tables also.
                Ques 2: when i save the data grid values using save button means that data will store in respective cloud DTO which is related to the datagrid,
                    My requirement is i am using a search button when i click the search button it will show a datagrid that datagrid will contain the previous datagrid datas which is saved in the cloud.
    REQUIREMENT example: first screen: i am using with data grid 3 columns (Student Roll number ,Student Name,Student pecentage)---->save--->data will store in cloud DTO.
    Second screen: search button ----> it need show  datagrid popup.it will have data which we saved in the first screen with same columns(Student Roll number ,Student Name,Student pecentage).
    This is my requirement.
    Any suggession welcome.
    Thanks in advance.
    B.Venkatesan

    Lets break the problem statement in multiple steps
    1. We need a way to know the selection on all rows.
    2. We need the association of the checkBox with the data
    The  solution is to use a arrayCollection/array that holds all the instances  created for checkbox.This collection should be a property of component  containing the datagrid. We need to use a custom component  implementation or inline ItemRenderer. The way you have used is called  dropinItemRenderer. Preferaly use custom component implementation and  add the instance to the arrayCollection at CreationComplete. Make sure  you use addItemAt so that you add the instance in the same row as the  data. To get rowIndex the custom Checkbox should implement  IDropInListItemRenderer. You could iterate this collection to check all  the instances that are checked.
    Note: This is the approach considering your dataprovider doesnt have a selection field.
    Nishant

  • Print SD moves throught MIGO

    Hello ppl, i know that this can be done, but i cant do it, i want to print via MIGO some SD movements like 601, 602,631 and 632.
    When i display the material document in MIGO, and check the checkbox with collective slip, a message appears, "The system could not create any outputs", I which configuration I need to do? thanks!

    Hello and thanks for the answers, unfortunately the replies that u gave me doesnt work at all, i maintain the mn21, the Output type, WE03 and WA03, and i still have the same issue, i configured just as u told me, and also add to my profile in SU01 the parameter NDR, this parameter doesnt check the box in MIGO Display mode, only when i create a new GR. The message still appears "The system could not create any output", if i go to the help button this information displays:
    The system could not create any outputs
    Message no. MIGO032
    Diagnosis
    Output determination was unable to find any valid condition records.
    Possible resons:
    Output determination has not been configured properly in Customizing.
    A material document printout is not planned for the movement type.
    Procedure
    Check whether
    the condition record has been maintained properly
    the KZDRU indicator has been properly set for the movement type
    Maintenance of this object is carried out via Customizing.
    Make the appropriate settings in Customizing as necessary or inform your system administrator
    Maybe this aditional info can help u guys with my problems, thanks a lot!

  • Repopulating a multiselect list with saved values

    Hi,
    I am new to using HTML DB and have been searching the Internet on information I could find about it.
    I found some useful information about multiselect boxes and can get the inserts to work but I am having problems with the repopulating of the multiselect from the underlying table.
    I am using the following code to get the information from the table and the process point is On Load - After Header.
    DECLARE
    l_selected HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    BEGIN
    SELECT risk_owner_id BULK COLLECT
    INTO l_selected
    FROM rmd_risk_risk_owners
    WHERE risk_id = :P34_RISK_ID;
    :P34_RISK_OWNER_ID := HTMLDB_UTIL.TABLE_TO_STRING( l_selected );
    END;
    but the multiselect list doesn't seem to repopulate with the values.
    Does anyone have an idea I what I could be doing wrong from their previous experience. Any suggestions would be appreciated.
    Regards,
    Scott.

    Lets break the problem statement in multiple steps
    1. We need a way to know the selection on all rows.
    2. We need the association of the checkBox with the data
    The  solution is to use a arrayCollection/array that holds all the instances  created for checkbox.This collection should be a property of component  containing the datagrid. We need to use a custom component  implementation or inline ItemRenderer. The way you have used is called  dropinItemRenderer. Preferaly use custom component implementation and  add the instance to the arrayCollection at CreationComplete. Make sure  you use addItemAt so that you add the instance in the same row as the  data. To get rowIndex the custom Checkbox should implement  IDropInListItemRenderer. You could iterate this collection to check all  the instances that are checked.
    Note: This is the approach considering your dataprovider doesnt have a selection field.
    Nishant

  • How to update collection when checkbox changed in report

    I have a report based on a collection:
    select seq_id
           ,c001
           ,c002
           ,apex_item.checkbox(1,seq_id,decode(c003,'J','CHECKED','UNCHECKED')) selected
    from apex_collections
    where collection_name='CONCOLLECTION'When the checkbox changes I want to store the new checked/unchecked status in the collection.
    Steps towards a solution I've come up with:
    1 Create a dynamic action: Change, jquery selector : input[name="f01"]
    2 Create javascript to store value (=seq_id) of changed item into a hidden page item.
    3 plsql code to update collection member with seq_id that is now in hidden item.
    Is this the way to do it?
    If so, it's the javascript of step 2 that I can't figure out.
    thanks, René

    thanks this works.
    Using javascript I store the seq_id and the checked value in 2 page items
    $s('P70_SEQ_ID', $(this.triggeringElement).val() );
    $s('P70_CHECKED', $(this.triggeringElement.checked).val() );The checked value I get is <empty> when checked and 'undefined' when unchecked. Based on this I can now update the collection.
    declare
      l_selectie varchar2(1);
    begin
      if v('P70_CHECKED')='undefined'
      then
        l_selectie := 'N';
      else
        l_selectie := 'J';
      end if;
      apex_collection.update_member_attribute(p_collection_name => 'CONCOLLECTION'
                                                 ,p_seq             => v('P70_SEQ_ID')
                                                 ,p_attr_number     => 3
                                                 ,p_attr_value      => l_selectie);
    end;

  • Checkbox Selections into a Collection

    I have been tossing this around for a while now and can’t seem to come up with a solution from examples and docs. I know I'm missing something, but I don't know what. I am hoping one of you can shed some light on what I missing to get me back on track or on a new track if this one is wrong.
    I am trying to select multiple records in a report then go to a second page to add a single status and comment for the group of selected records. The status, comment, and some of the original report data (like primary key) will be merged into a secondary table once I get the collection working. I would do this all on one page but I also have a number of criteria selections on the first page that I think would become too busy if I also added the status and comment fields.
    In order to create this report, I think I need to use a collection to hold the selected records. I can get the PK and associated fields from a simple SQL report into a collection but I can only get the PK from PL/SQL. I can use the PK to pull the data from the database again but I hate the thought of hitting the database again for data I have on the screen. I am using PL/SQL to allow the WHERE clause to dynamically change based upon the criteria selected.
    For the collection, I am using the method from Joel Kallman’s blog (http://joelkallman.blogspot.com/2008/03/preserving-checked-checkboxes-in-report.html) to preserve the rows as they are selected. It works great for the item listed in the apex_item.checkbox item but I can’t find an answer to how to also bring some of the other fields from the report into the collection.
    I have posted a simplified example on OTN for your review/comments. It does not contain the criteria mentioned above to eliminate complexity from the example. I am using APEX version 3.2.0.00.27.
    Workspace: bobs
    Username: guest
    Password: abc123
    Application: Multi Select Edit – 60803
    Page 1 will give you a menu to select the SQL or PL/SQL version of the pages.
    I would also love to be able to have the multi select working at the heading of the checkboxes in the PL/SQL report but I can’t get it to work properly. The boxes will all show as checked but the data doesn't get put into the collection unless the checkbox for each row is individually selected. This feature is not in the example since it is a lower priority.
    The basics of the example PL/SQL report are as follows._
    The report source is:
    DECLARE
    q VARCHAR2(32767); -- query
    BEGIN
    q := 'select apex_item.checkbox(1, empno, ''onclick="f_UpdateCollection(this)"'',a.c001) cbox, '||
    ' "EMPNO", '||
    ' "ENAME", '||
    ' "JOB", '||
    ' "MGR", '||
    ' "SAL", '||
    ' "DEPTNO" '||
    ' from "EMP", apex_collections a '||
    ' where '||
    ' a.c001 (+)= empno '||
    ' and a.collection_name (+)= ''EMP_COLLECTION'' ';
    RETURN q;
    END;
    The HTML Header for the page contains the function that is called from the onclick statement.
    <script type="text/javascript">
    <!--
    function f_UpdateCollection( cb ){
    var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=UpdateCheckboxValue',0);
    get.addParam('x01',cb.value);
    get.GetAsync(function(){return;});
    get = null;
    //-->
    </script>
    And the Application Process that populates the collection is:
    declare
    l_value varchar2(4000);
    l_seq_id number := 0;
    l_collection_name constant varchar2(30) := 'EMP_COLLECTION';
    begin
    -- Get the value of the global which will be set in JavaScript
    l_value := wwv_flow.g_x01;
    -- If our collection named EMP_COLLECTION doesn't exist yet, create it
    if apex_collection.collection_exists( l_collection_name ) = FALSE then
    apex_collection.create_collection( p_collection_name => l_collection_name );
    end if;
    -- See if the specified value is already present in the collection
    for c1 in (select seq_id
    from apex_collections
    where collection_name = l_collection_name
    and c001 = l_value) loop
    l_seq_id := c1.seq_id;
    exit;
    end loop;
    -- If the current value was not found in the collection, add it. Otherwise, delete it from the collection.
    if l_seq_id = 0 then
    apex_collection.add_member(
    p_collection_name => l_collection_name,
    p_c001 => l_value );
    else
    apex_collection.delete_member(
    p_collection_name => l_collection_name,
    p_seq => l_seq_id );
    end if;
    commit;
    end;
    The final report is a simple select from the collection.
    select *
    from apex_collections
    where collection_name = 'EMP_COLLECTION'
    Thank you for your time.
    Bob

    Jeff,
    Thanks for the response. I had tried the apex_item before but I couldn't get it to work. I have changed the SQL to include the apex_item commands then used them to define parameters in the javascript function then added parameters to the Application Process but I get no data found. Am I using the apex_item wrong in the SQL or the apex_application wrong in the javascript?
    Thanks,
    Bob
    SQL:_
    q := 'select apex_item.checkbox(1, empno||''~''||ename||''~''||job||''~''||hiredate, ''onclick="f_UpdateCollection(this)"'',a.c001) cbox, '||
    ' apex_item.display_and_save(2,empno) "EMPNO", '||
    ' apex_item.display_and_save(3,ename) "ENAME", '||
    Javascript:_
    function f_UpdateCollection( cb ){
    var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=UpdateCheckboxValue',0);
    get.addParam('x01',cb.value);
    get.addParam('x02',apex_application.g_f02);
    get.addParam('x03',apex_application.g_f03);
    get.GetAsync(function(){return;});
    get = null;
    Application Process:_
    declare
    l_value varchar2(4000);
    l_empno  varchar2(4000);
    l_ename  varchar2(4000);
    begin
    l_value := wwv_flow.g_x01;
    l_empno := wwv_flow.g_x02;
    l_ename := wwv_flow.g_x03;
    apex_collection.add_member(
    p_collection_name => l_collection_name,
    p_c005            => l_empno,
    p_c006            => l_ename,
    p_c010 => l_value );
    ...

  • Quicker way to collect checkbox inputs?

    I will have a number of checkbox inputs on my JSP page. The idea is an admin clicks on multiple checkboxes and then clicks a Delete button. Is there a slicker way of displaying each checkbox and then collecting the ones whose values marked as true than what I'm doing? What I'm doing is giving each input field a unique name, (e.g. id="user1", id="user2", ) and then on the server side looking for each one of those and checking if something is true.
    I'm sure there's a better way. Much grateful for your suggestions, - Dave

    Assign them all the same name, give each an unique value, e.g. the ID, and collect them all by HttpServletRequest#getParameterValues().

  • Issues with saving checkboxes to a collection

    version 4.0.2.00.06
    Hello,
    I'm having a couple of issues with this.
    1. I have a report with checkboxes created using the apex_item.checkbox api. When the page is submitted the checkboxes are no longer checked. Jari has a post that explains how to use collections to store the checkbox value to keep the checkbox checked. Of course the checkboxes are not staying checked when the page is submitted. Jari's explanation is here: Re: Need help with APEX_Collection
    2. I'm now getting duplicate rows returned. I've opened the Session window from the Dev Toolbar and selected Collections in the drop down box and it appears that all the records from my view are being entered into the collection. I would have thought that only the records returned from the WHERE clause would be added.
    This is what I have.
    1. I created an application process: SAVE_CUST_CHK_P29
    BEGIN
      APEX_COLLECTION.UPDATE_MEMBER_ATTRIBUTE(
        p_collection_name => 'CUST_CHK_COLLECTION',
        p_seq             => APEX_APPLICATION.G_X01,
        p_attr_number     => 2,
        p_attr_value      => APEX_APPLICATION.G_X02
      htp.prn('1');
    EXCEPTION WHEN OTHERS THEN
      htp.prn('0');
    END;2. Edit Page -> JavaScript -> Function and Global Variable Declaration section:
    function saveCustChk(p,s){
    $.ajax({
      type:'POST',
      url:'apex_application.show',
      dataType:'text',
      data:{
       p_flow_id:&APP_ID.,
       p_flow_step_id:&APP_PAGE_ID.,
       p_instance:&APP_SESSION.,
       p_request:'APPLICATION_PROCESS=SAVE_CUST_CHK_P29',
       x01:s,
       x02:p.checked
      },success:function(){gReport.pull()}
    }And in the HTML Header section:
    <style>#apexir_CHK{display:none}</style>3. Created an On-Load After Header Page Process: create_cust_chk_collection
    IF NOT APEX_COLLECTION.COLLECTION_EXISTS(p_collection_name => 'CUST_CHK_COLLECTION')
    THEN
      APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B(
        p_collection_name => 'CUST_CHK_COLLECTION',
        p_query => q'!
          SELECT cust_id,
            'false' AS chk
          FROM vw_customers_dm_query
    END IF;4. The report query:
        SELECT  apex_item.checkbox(1,c.c002,'onclick="saveCustChk(this,'||c.seq_id||')"','true') AS chk
            ,c002 AS checked
            ,cust_id
            ,cust_number
            ,cust_company_name
            ,cust_address
            ,cust_city
            ,cust_state
            ,cust_postal_code
            ,decode(cls_code,'A','Active','I','Inactive','D','Active-Declining','P','Prospect') seg_descr
            ,annual_sales
            ,year_month
            ,dlr_id
            ,dlr_code
            ,drg_code
            ,cls_code
            ,annual_sales_range
        FROM vw_customers_dm_query v, apex_collections c
        WHERE c.collection_name = 'CUST_CHK_COLLECTION'
        AND v.cust_id = c.c001
        AND :P29_CUST_SEG LIKE '%'||cls_code||'%'
        AND cls_code IS NOT NULL
        AND :P29_DISTANCE LIKE '%'||drg_code||'%'
        AND :P29_PURCHASE_AMT LIKE '%'||annual_sales_range||'%'
        AND dlr_id = :P29_DLR_IDCan someone help me with 1. Why won't the checkboxes stay selected on submit and maybe why there are dupllicate rows returned?
    Thanks,
    Joe

    Hello,
    For issue 2 above: Duplicate rows returning.
    What I would like to do is add another column in the collection called year_month and join that column back to the vw_customers_dm_query. I can't seem to get the column into the collection.
    This is what I've tried:
    In the application process I added p_attr_number => 3 and p_attr_value => apex_application.g_x03
    In the On-Load After Header Process I added the column year_month after the column creating the CHK so I had:
    SELECT cust_id,
            'false' AS chk,
             year_month as year_month_coll
          FROM vw_customers_dm_queryOf course this did not work. How can I now:
    1. Get the check boxes to save to they're not unchecked when the page is submitted?
    2. Get the year_month column into the collection so I can join to it and get rid of my duplicate row issue?
    Thanks,
    Joe
    UPDATE:
    I was able to get the column added to the collection and take care of the duplicate row problem, but the checkboxes are still not staying checked after submit.
    I still need help with getting this part to work.
    Thanks,
    Joe
    Edited by: Joe R on Jun 6, 2011 1:29 PM
    Added Update.

  • Use of Checkbox in Report for calculation and determine checked records

    Dear All,
    Application Express 4.0.1.00.03
    I have a Report based on Invoice table which displays unpaid Invoices.
    Also I have added one check box (Not a column in Invoice field) to each row of the report query, the user will be check to pay the Invoice, on checking of the Invoices I need to
    1. Calculate the total of Invoice Amount for selected Invoices.
    2. After selection of Invoices User will click on a Button which will open the Payment Form (New Page or Same Page Region),
    but some way I need to know the Invoice No. of each Invoice row selected so that I can use all the selected Invoice No's for creating the Payment.
    3. Any way to add a button on each row of the Invoice that will be used for the Payment of that Invoice only.
    One way can be to create a column to save the check box value which I am aware of, but am looking for other alternate if possible.
    Hoping for some good solution.
    Thanks & Regards
    Arif Khadas

    vee wrote:
    You would need to make the amount column(the one which is used for total) editable so that its value can be accessed easily from JS. You can made it read-only if required ( apex_item.text(2,INV_RENT_VALUE + INV_OTHER_VALUE ) ?? ) .
    How can I make it read only, there is no such attribute which can be set for report column as it exists for Items.
    Also Now I have the following report query:
    SELECT  INV_LSE_NUM                      "Contract No.",
            INV_FROM_DATE                    "Collection Date",
            INV_FROM_DATE                    "From Date",
            INV_TO_DATE                      "To Date",
            INV_RENT_VALUE + INV_OTHER_VALUE "Invoice Amount",
            INV_AMOUNT_PAID                  "Amount Paid",
            INV_RENT_VALUE + INV_OTHER_VALUE
                           - INV_AMOUNT_PAID "Balance",
            INV_NUM                          "Invoice No.",
            'Pay'                            "Pay",
            APEX_ITEM.CHECKBOX (1, INV_NUM)  "CB_PAY",
            APEX_ITEM.TEXT (2, INV_RENT_VALUE + INV_OTHER_VALUE - INV_AMOUNT_PAID)
                                             "BAL"
    FROM    RE_INVOICE
    WHERE   INV_COM_NUM    =  :P0_COM_NUM
    AND     INV_RENT_VALUE + INV_OTHER_VALUE > INV_AMOUNT_PAID
    AND     INV_LSE_NUM    =(SELECT TO_NUMBER (C001)
                             FROM   APEX_COLLECTIONS
                             WHERE  COLLECTION_NAME = 'LEASE'
                             AND    SEQ_ID          = TO_NUMBER (:P24_SR_NO))The Next thing is the HTML Header for the Page:
    <script language = "JavaScript" type="text/javascript">
    total = 0;
    $('input[name=f01]:checked').each( function(){
      parent_row = $(this).parents('tr:first');
      amt = ( parent_row.find('input[name=f02]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f02]').val() );
      total += amt;
    $s('TEST',total);  -- Test is an Item on the Page.
    </script>Also I checked from the Page source "CB_PAY" and "BAL" have names f01 and f02 respectively.
    Even now when I check or un-check the Value in TEST item is not displayed as required.
    Anything more is required, what am I missing.
    Thanks & Regards
    Arif Khadas

  • Trying to remove a checkBox from a list of checkBoxes

    Hello,
    I have a dictionary that has TKey equal to a Decimal and with TValue equal to a List<CheckBox>. I declare it like so:
    Dictionary<Decimal, List<CheckBox>> entireCheckBoxList = new Dictionary<Decimal, List<CheckBox>>();
    The reason for doing this is that I can pass it a NumericUpDown value (which only is in Decimal), then I can find any created CheckBox's that corespond to the NumericUpDown value. So let say I have my NumericUpDown equal to 1, when I click on the up
    arrow, I pop-up a new form window that lets me enter data lets say folder name and file name. Then, when I click my save button, I create check boxes for a folder name and under that check box is a the file name but it is slightly indented to the right and
    under it:
    So the reason why I have a Decimal TKey is that when i pop up a new form to create checkBoxes, I can create as many check boxes as I want and only want to assign them to one number. So if I create 4 check Boxes in one form pop-up form, then I want the numberUpDown
    value to only be increased by one when I save it and create them. 
    So my main question is, when I click down on the numericUpDown arrow, I want to remove the index associated with the numericUpdown from both the control and this dictionary. I am able to remove from the dictionary like so:
    entireCheckBoxList.Remove(numbericUpDownValue);
    However now I want to remove from the control with something like this:
    this.tabPage1.Controls.Remove(entireCheckBoxList[numbericUpDownValue]);
    But I am receiving the following errors:
    Error 1
    The best overloaded method match for 'System.Windows.Forms.Control.ControlCollection.Remove(System.Windows.Forms.Control)' has some invalid arguments
    Error 2
    Argument 1: cannot convert from 'System.Collections.Generic.List<System.Windows.Forms.CheckBox>' to 'System.Windows.Forms.Control'.
    All I want to do is remove the check boxes associated with the numericUpDown value from the control that correspond to the ones created and stored in my dictionary List<CheckBoxes>. I am just not sure how to do it.
    Kind Regards.

    Ok great thanks for this. 
    I have just realized that if I can just remove the last item in the entireCheckBoxList dictionary added, then there is no reason for the numbericUpDownValue look up. I just need to remove the last item in this dictionary.
    I have tried many things to get the last item in the dictionary but are all out of ideas.
    Any clue?
    I have done this:
    var test = entireCheckBoxList.Last();
    then since this gives me the last value, I have then looped through like so:
    foreach (CheckBox item in test.Value)
    Then to remove only the last items created, since they are done in pairs, i have done this:
    count++;
    if ((count == test.Value.Count - 1) || (count == test.Value.Count))
    this.tabPage1.Controls.Remove(item);
    else
    if (!yourlist.Contains(item))
    yourlist.Add(item);
    entireCheckBoxList.Add(count, yourlist);
    where count is an int declare above. So the final solution is this:
    var test = entireCheckBoxList.Last();
    int entireCheckBoxCount = entireCheckBoxList.Count;
    List<CheckBox> yourlist = new List<CheckBox>();
    int count = 0;
    entireCheckBoxList.Clear();
    foreach (CheckBox item in test.Value)
    count++;
    if ((count == test.Value.Count - 1) || (count == test.Value.Count))
    this.tabPage1.Controls.Remove(item);
    else
    if (!yourlist.Contains(item))
    yourlist.Add(item);
    entireCheckBoxList.Add(count, yourlist);
    What do you think?
    Kind Regards.

  • Why are some properties collections, can they really contain more than 1 item?

    I notice that sometimes an objecthas a property that I would expect to be singular, but is exposed as a collection. For instance, TextFrame.texts is a collection of Text objects. But how could a textFrame contain more than one Text object?
    And related to this topic, why does the Text object have a property Texts? What could be in that for a given text?
    Thanks!

    toyo8696 wrote:
    1.This morning upon bootup from complete shutdown, I had like 3 or 4 windows open up.
    Auto resume feature of Lion. To disable the feature:
    Launch System Preferences and click on the “General” icon
    At the bottom of the “Number of recent items” list, uncheck the checkbox next to “Restore windows when quitting and re-opening apps”
    2. Likely tied to above. How can I close, shut down completely programs? I hit the red X then it still shows the white dot under the application in the dock. For example, I use Chrome. I only opened up Safari a few times when I 1st got this yesterday. However, I have a white dot under Safari.
    after you close out the program, when you see the light still under the programs icon in the dock, right click and select quit.
    3. Is there anyway to add a application from the dock to stick in Launchpad?
    not that I am aware of.  This doesn't mean it's not possible.  It just means if there is a way, I am not familiar with how to accomplish this.

  • How to get selected values (using checkBox) from DataGrid in flex.

    i have a datagrid which is getting values from a XML file (getting this xml file from database using PHP and HTTP request in flex). i have created a checkbox in every row in data grid. and here is my requirement: i want to select tow or three check-box and would like to get all the values form that particular ROWs in some form , prefered arraycollection (such that i can pass this array directly to a bar chart) .. can some one help me as i am new to flex .
    code ......
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="siteData.send()">
              <mx:Script>
                        <![CDATA[
                                  import mx.collections.XMLListCollection;
                                  import mx.controls.*;
                                  import mx.events.ListEvent;
                                  import mx.rpc.events.ResultEvent;
                                  import mx.controls.Alert;
                                  [Bindable] private var fullXML:XMLList;
                                  private function contentHandler(evt:ResultEvent):void{
                                            fullXML = evt.result.values;
                        ]]>
              </mx:Script>
              <mx:VBox>
                        <mx:Label text="This Data Grid is loading the full XML file"/>
                        <mx:DataGrid width="600"  id="datagrid" dataProvider="{fullXML}">
                                  <mx:columns>
                                            <mx:DataGridColumn headerText="Select">
                                                      <mx:itemRenderer>
                                                                <mx:Component>
                                                                          <mx:HBox horizontalAlign="center">
                                                                                    <mx:CheckBox id="check"/>
                                                                          </mx:HBox>
                                                                </mx:Component>
                                                      </mx:itemRenderer>
                                            </mx:DataGridColumn>
                                            <mx:DataGridColumn dataField="release_version" headerText="Release"/>
                                            <mx:DataGridColumn dataField="build" headerText="build"/>
                                            <mx:DataGridColumn dataField="time_login" headerText="time_login"/>
                                            <mx:DataGridColumn dataField="time_tunnel" headerText="time_tunnel"/>
                                            <mx:DataGridColumn dataField="rate_login" headerText="time_tunnel"/>
                                            <mx:DataGridColumn dataField="rate_tunnel" headerText="rate_tunnel"/>
                                  </mx:columns>
                        </mx:DataGrid>
              </mx:VBox>
              <mx:HTTPService url="http://localhost/php_genxml.php" id="siteData" result="contentHandler(event)" resultFormat="e4x"/>
    </mx:Application>
    as you can see in the image , i will get this datgrid . now i want to select two or three checkboxes and would like to get all the values form the perticular row (for which check box is selected). i would like to get in array from such that i can driectly pass them to bar chart....
    can some one help me in this. as i m new to flex. or if you have some other suggestion ...My final requirement is: select some values and generate bar gharph for those values.
    please help me in this.
    thanks
    tanuj

    Hi Timo -
    Thanks for the suggestion. I could get the values as below:
    public void multiOpUnitValChange(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding opUnitIter = (DCIteratorBinding)bindings.get("OperatingUnit2VOIterator");
    Integer[] values = (Integer[])valueChangeEvent.getNewValue();
    for (int i=0; i<values.length; i++){
    Row row = opUnitIter.getRowAtRangeIndex(i);
    System.out.println(row.getAttribute("OpUnitId"));
    Thanks -
    Rohit

Maybe you are looking for

  • Enclosing an int variable in a statement

    hello i have a problem that i can't seem to solve i have a database with for example: name=varchar number=int now i want a statement: int n = 4; select name where number=n; i know i have to use '"+n+"' if it is a String but i don't know what to do wi

  • Ethernet data

    Hi everyone, I am evaluating Labview for my company to see if this is a product that we can use.  I'm confident we can get this to work, I'm just not confident in my Labview abilities yet and I need to create a working app for management to review. H

  • Repainting a content pane

    I'm having trouble repainting the contentPane of the parent Container in my GUI app. The application sets a new ContentPane occasionally, but when this happens, the new contentpane does not appear unless I resize the window of the application, or do

  • Mime type for autodesk mapguide

    I need a copy of application/x-mwf to be able to use the map service of my local city council. I have tried Apple, Autodesk and the city's web sites without success. Any help would be greatly appreciated. michael

  • HT1810 I am thinking of using the firewall stealth-mode application. Please tell me what disadvantages, if any, it might create for me..

    I am thinking of using the firewall stealth-mode application. Please tell me what disadvantages, if any, I might experience. Thanks. John