Dynamic selection of records based on checkbox checked

Hello,
I want to select a list of records from a multirecord block by
using the checkbox checked values as the criterion and use the
records selected in the where clause for querying in another
forms. The data from the multirecord block is from a query
result and hence is dynamic.
I went about doing this:
I created a multirecord block. In the multirecord block, I
created a checkbox which was a non-database item.
In the when_button_pressed trigger I wrote the following code:
declare
     temp varchar2(1000);
     start_rec number;
     stop_rec number;
     item_id item;
     block_id block;
     item_value varchar2(1000);
     pl_id paramlist;
     item_name varchar2(10);
     patient_list varchar2(1000);
begin
go_block('patient_list');
block_id:=find_block('patient_list');
start_rec:=1;
stop_rec:=get_block_property(block_id,query_hits);
for i in start_rec..stop_rec loop
if :selection='Y' then --selection is the checkbox           
     if item_value is null then
/*item_value holds the value of the data shown in the forms &
for which the checkbox is checked*/
item_value:=name_in(':patient_list.patient_id');
/*patient_id is the item name as well as field name in the
table*/
     else
item_value:=item_value||','||name_in(':patient_list.patient_id');
     end if;
end if;
end loop;
patient_list:='('||item_value||')';
pl_id:=create_parameter_list('list_of_patients');
add_parameter(pl_id,'querypatients',text_parameter,patient_list);
message(patientlist);
run_product
(forms,'patient_history',synchronous,runtime,filesystem,pl_id,nul
l);
end;
When I run this form, patient_list comes as
(111,111,111,111,111,111,111) where
111 is the value of the patient_id.
The only value that gets into the patient_list is the patient_id
for the last checkbox I have
checked in the forms and the same patient_id appears so many
times.
Can anyone tell me where I am doing the mistake? Why is the same
value appearing so many times and only the last record selected
appears in the patient_list.
Thank you for your suggestions.

Thank You.
I added go_record(start_rec) and next_record and everything
worked fine.
Here I have the working code:
declare
     temp varchar2(1000);
     start_rec number;
     stop_rec number;
     item_id item;
     block_id block;
     item_value varchar2(1000);
     pl_id paramlist;
     item_name varchar2(10);
     patient_list varchar2(1000);
begin
     go_block('patient_list');
     block_id:=find_block('patient_list');
     start_rec:=1;
     stop_rec:=get_block_property(block_id,query_hits);
go_record(start_rec);-- I added it
     for i in start_rec..stop_rec loop
     if :selection='Y' then --selection is the checkbox in  
the patient_list block.
     if item_value is null then
-- item_value holds the value of the data shown in the forms and
for which the checkbox is checked
     item_value:=name_in(':patient_list.patient_id');
-- patient_id is the item name as well as field name in the table
     else
     item_value:=item_value||','||name_in
(':patient_list.patient_id');
     end if;
     end if;
next_record;-- I added it
     end loop;
patient_list:='('||item_value||')';
pl_id:=create_parameter_list('list_of_patients');
add_parameter(pl_id,'querypatients',text_parameter,patient_list);
message(patientlist);
run_product
(forms,'patient_history',synchronous,runtime,filesystem,pl_id,nul
l);
end;

Similar Messages

  • Display multiple records based on checkbox selection

    Hi - I have a cfm page that displays all the employees in the
    company (select * from employee). I have a checkbox next to each
    one of the employee name. I want the users to be able to select the
    checkbox and view phone number of selected employees (select
    phone_number from employee where emp_id = 12, 15, 18, 20, 31) I
    know I'll have to use some kind of loop to pick these employees and
    display ... but I don't know how to write that loop ... can
    somebody please help!
    - Amber

    The code below should help you out.

  • How to update the record based on checkbox

    Dear All,
    Good Afternoon,
    Here i am creating Company Creation Page,
    Company has multiple personss
    At the time of company creation we set one person as primary person.
    that means we just pass that person id as company primary person id columnnn in company table.
    vo.getCurrentRow().setAttribute("CompPrimarypersonid", pid);
    here i am getting so many persons details with checkboxes.
    suppose i want to set another person as a primary person by just clicking on check box.
    At that time pass this person id into company primary persin id column in company table.
    already primary person id is overwrite with this company id.
    how can we get this requirement.
    its very urgent to mee
    give me the guidance for this requirement.

    Hi,
    You can write a procedure and call it through AM using Callable Statement passing the person_id and company_id.
    Now in the procedure, you can check that what is the primary person_id of this company_id.
    Store that primary_person_id in a variable say test.
    then update the company table with new primary person_id
    update company set primary_person_id = <new person_id > where primary_person_id = test;
    commit;
    Thanks,
    Gaurav

  • Select distinct record based on column

    Hello All,
    I have a table that has more than one row as Detail for a single invoice number(screenshot below). When I create report based on this table, I get multiple rows for single invoice. I mean Invoice 000027 shows up with 5 different rows on the SSRS report.
    Is there a way I could display a single row for a single invoice? Any thoughts on this will be greatly appreciated. Thanks.
    Regards,
    Amol
    eport )

    Thank you all for your suggestions. The issue is how can I get single distinct columns after joining 2 tables (InvoiceHeader & InvoiceDetail). I am using following query in my dataset.
    SELECT DISTINCT I.recid, I.InvNumber, D.Detail, I.CompanyName, I.Addr1, I.SalesRep, I.JobNumber, I.Status, I.InvDate, I.TotalInvAmount
    FROM            InvoiceHeader AS I INNER JOIN
                             InvoiceDetails AS D ON I.InvNumber = D.InvoiceNumber
    WHERE        (I.InvNumber = @InvoiceNumber) AND (I.InvDate >= @StartDate) AND (I.InvDate <= @EndDate) AND (I.CompanyName IN (@Customer)) AND (I.Status IN (@Status)) OR
                             (I.InvDate >= @StartDate) AND (I.InvDate <= @EndDate) AND (I.CompanyName IN (@Customer)) AND (I.Status IN (@Status)) AND (I.JobNumber = @JobNo) OR
                             (I.InvNumber = @InvoiceNumber) AND (I.InvDate >= @StartDate) AND (I.InvDate <= @EndDate) AND (I.CompanyName IN (@Customer)) AND (I.Status IN (@Status)) 
                             AND (@JobNo = '') OR
                             (I.InvDate >= @StartDate) AND (I.InvDate <= @EndDate) AND (I.CompanyName IN (@Customer)) AND (I.Status IN (@Status)) AND (I.JobNumber = @JobNo) AND 
                             (@JobNo = '') OR
                             (I.InvDate >= @StartDate) AND (I.InvDate <= @EndDate) AND (I.CompanyName IN (@Customer)) AND (I.Status IN (@Status)) AND (@JobNo = '') AND 
                             (@InvoiceNumber = '')
    ORDER BY I.InvNumber DESC
    Thanks again.
    Amol

  • Selection of records based on minimum date actioned

    Post Author: jrdoyle
    CA Forum: Data Connectivity and SQL
    Hi!
    I've been building a report that displays records, grouped by the Service Department  to which they have been assigned; however I need to constrain the report to only show the Service Department to which the record was first assigned.  I had tried to group the report by incident reference #, and had in the details the actions taken agains the record, the date of the action, the SVD to which it was assigned, etc.  In the Select Expert, I have the following:
    {INC_DATA.EVENT_TYPE} = "i" and{SERV_DEPT.SERV_DEPT_SC} = "DISPATCH" and{INCIDENT.DATE_LOGGED} in DateTime (2007, 05, 01, 00, 00, 00) to DateTime (2007, 05, 30, 00, 00, 00) and{SERV_DEPT_1.SERV_DEPT_SC} in &#91;"CUSTHOME", "CUSTWEST", "HARDWARE"&#93;
    The SERV_DEPT_1 table will displays the information about the Service Department to which the records are assigned.  I need to be able to count only the minimum date of assignment.  I've tried using the Minimum function, but it appears that I then can't summarize (count records) higher up in the report groups, as it gets evaluated after (?) the groups are made.
    Is anyone able to offer suggestions as to how I might go about this?  I have tried to somehow flag records in the details which meet the criteria, but haven't been able to come up with anything yet.
    Thanks!

    Post Author: Jagan
    CA Forum: Data Connectivity and SQL
    I'm not quite sure how/where you tried to use the Minimum function - sounds like you used it in the record selection formula? Anyway, if you want the report to have only the earliest record per service department group then you can use the group selection expert, e.g.{incident.date_logged} = minimum({incident.date_logged}, {serv_dept_1.serv_dept_sc})If you want to display the earliest record but still have the other records there for processing then sort on {incident.date_logged} ascending, suppress the details, and print in the {serv_dept_1.serv_dept_sc} group header. i.e the record you're "looking" at in the group header is the first one for the group.The difference between the two is that the former will only have one record per service department group (assuming the date_logged is unique per incident per department) while the latter will have all records but only display one. This makes a difference when using the built-in summary functions.

  • Select the record based count condition

    Hi Experts
    I have a table with columns  StateDate,State,Name & Type . For the same date there could be 2 or more rows for the same name .
    I need to retrieve the data from the table only for the name containing single row in the table and state = 'On'
    Please find the Create & Insert Scripts below . Am assuming it needs to be done with a window function and am not yet comfortable with window function .
    CREATE TABLE ItemState
    (StateDate Date,
    State Varchar(3),
    Name Varchar(3),
    Type int)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','Off','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','ABC',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','Off','CBR',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','On','CBR',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','On','XYZ',1)
    Expected Result
    StateDate
    State
    Name
    Type
    3/11/2014
    ON
    ABC
    1
    3/12/2014
    ON
    XYZ
    1
    Kindly help
    Thanks
    Priya

    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','Off','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','ABC',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','Off','CBR',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','On','CBR',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','On','XYZ',1)
    again adding this 3 rows 
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','Off','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','ABC',1)
    SELECT *
    FROM   itemstate order by statedate, name,state
    2014-03-11 On
    ABC 1
    2014-03-11 On
    ABC 1
    2014-03-11 Off
    XYZ 1
    2014-03-11 Off
    XYZ 1
    2014-03-11 On
    XYZ 1
    2014-03-11 On
    XYZ 1
    2014-03-12 Off
    CBR 1
    2014-03-12 On
    CBR 1
    2014-03-12 On
    XYZ 1
    so only xyz on 2014-03-12 will qualify
    WITH test
         AS (SELECT *,
                    row_number()
                      OVER (
                        partition BY statedate, name
                        ORDER BY state ASC) rnasc, 
    count(state)
                      OVER (
                        partition BY statedate, name
                        ORDER BY state desc) rncount
             FROM   itemstate)
    SELECT *
    FROM   test t1  where rnasc = 1 
    and state = 'on' and rncount = 1
    Amish shah
    http://bloq.sqltechie.com

  • Select records based on criteria and update those records once read

    hi,
    I am very new to bpel and DB adapters.
    I have a requirement where in I need to query two tables to fetch some records and update these selected records with a new value for field to indicate that bpel has processed these records.
    Once I select these I needs the output to be mapped to the output variable.
    I am able to select the records based on criteria , but how will i lock these records so that these records do not get processed again. This should be a very simple usecase just that I am not aware.
    Thanks,
    Robin

    Once you have finished reading the records fire an update query , update some field in the table so that it does not get picked up next time.
    if you are using polling for picking up the records, then use logical delete scenario, refer....http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/adptr_db.htm#BABEEBIH

  • How to add a checkbox to dynamic itab  so that i can select some records

    How to add a checkbox to dynamic itab  so that i can select some records in the alv and can display them in another alv using a button
    I have requirement where i have to display the dynamic itab records in an alv ....Some records from this alv output has to be selected through checkbox  provided in the first column .( I will get to know the structure of the itab only at runtime ,so iam using dynamic itab)

    Hi,
       I tried and finally i got it , Just try for it.
    type-pools : slis.
    PARAMETERS : p_tab type dd02l-tabname.
    data : ref_tabletype  type REF TO cl_abap_tabledescr,
           ref_rowtype TYPE REF TO cl_abap_structdescr.
    field-symbols  : <lt_table>  type   standard TABLE ,
           <fwa> type any,
           <field> type abap_compdescr.
    data : lt_fcat type lvc_t_fcat,
           ls_fcat type lvc_s_fcat,
           lt_fldcat type SLIS_T_FIELDCAT_ALV,
           ls_fldcat like line of lt_fldcat.
    data : ref_data type REF TO data,
            ref_wa type ref to  data.
    ref_rowtype ?= cl_abap_typedescr=>DESCRIBE_BY_name( p_name = p_tab ).
    TRY.
    CALL METHOD cl_abap_tabledescr=>create
      EXPORTING
        p_line_type  = ref_rowtype
      receiving
        p_result     = ref_tabletype.
    CATCH cx_sy_table_creation .
    write : / 'Object Not Found'.
    ENDTRY.
    *creating object.
    create data ref_data type handle ref_tabletype.
    create data ref_wa type handle ref_rowtype.
    *value assignment.
    ASSIGN ref_data->* to <lt_table>.
    assign ref_wa->* to <fwa>.
    loop at ref_rowtype->components ASSIGNING <field>.
      ls_fcat-fieldname = <field>-name.
      ls_fcat-ref_table = p_tab.
      append ls_fcat to lt_fcat.
    if lt_fldcat[] is  INITIAL.
        ls_fldcat-fieldname = 'CHECKBOX'.
        ls_fldcat-checkbox = 'X'.
        ls_fldcat-edit = 'X'.
        ls_fldcat-seltext_m = 'Checkbox'.
        append ls_fldcat to lt_fldcat.
      endif.
      clear ls_fldcat.
      ls_fldcat-fieldname = <field>-name.
      ls_fldcat-ref_tabname = p_tab.
      append ls_fldcat to lt_fldcat.
    endloop.
    loop at lt_fldcat into ls_fldcat.
      if sy-tabix = 1.
        ls_fldcat-checkbox = 'X'.
        ls_fldcat-edit = 'X'.
    modify lt_fldcat FROM ls_fldcat
        TRANSPORTING checkbox edit.
    endif.
    endloop.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog           = lt_fcat[]
      IMPORTING
        ep_table                  = ref_data.
    assign ref_data->* to <lt_table>.
    select * FROM (p_tab) into table <lt_table>.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       IT_FIELDCAT                       = lt_fldcat[]
      TABLES
        t_outtab                          = <lt_table>.
    Thanks & Regards,
    Raghunadh .K

  • Calling the smartform based on checkbox selection in ALV

    Hi
    i displayed the report output in ALV using 'REUSE_ALV_GRID_DISPLAY'. I maintained checkboxes as first column of data.
    and i also added three user defined buttons like check,uncheck,print form. Now my problem is when user selecting the records in ALV using the checkbox,i have to call the smartform based up on user selection of check box.i done but it is coming only for one checkbox.if we select multiple checkboxes it is not coming.but i need smartform has to call for every checkbox user has selected.
    can u suggest on this.all my data in internal table i_data with checkbox field. i'm copying my code here.
    LOOP AT I_DATA.
        READ TABLE I_DATA INTO WA_DATA INDEX FU_SELFIELD-TABINDEX.
        WA_DATA-SEL = 'X'.
        MODIFY I_DATA FROM WA_DATA TRANSPORTING SEL.
        FU_SELFIELD-REFRESH = 'X'.
    MOVE-CORRESPONDING WA_DATA TO WA_PRINT.
      APPEND WA_PRINT TO I_PRINT.
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            FORMNAME                 = 'ZHRF1_PTAR1001'
    *       VARIANT                  = ' '
    *       DIRECT_CALL              = ' '
         IMPORTING
           FM_NAME                  = FM_NAME
    *     EXCEPTIONS
    *       NO_FORM                  = 1
    *       NO_FUNCTION_MODULE       = 2
    *       OTHERS                   = 3
        IF SY-SUBRC  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      CALL FUNCTION FM_NAME
        EXPORTING
    *     ARCHIVE_INDEX              =
    *     ARCHIVE_INDEX_TAB          =
    *     ARCHIVE_PARAMETERS         =
    *     CONTROL_PARAMETERS         =
    *     MAIL_APPL_OBJ              =
    *     MAIL_RECIPIENT             =
    *     MAIL_SENDER                =
    *     OUTPUT_OPTIONS             =
    *     USER_SETTINGS              = 'X'
          FR_DATE                    = PN-BEGDA
          TO_DATE                    = PN-ENDDA
    *   IMPORTING
    *     DOCUMENT_OUTPUT_INFO       =
    *     JOB_OUTPUT_INFO            =
    *     JOB_OUTPUT_OPTIONS         =
        TABLES
          ITAB                       = I_PRINT
    *   EXCEPTIONS
    *     FORMATTING_ERROR           = 1
    *     INTERNAL_ERROR             = 2
    *     SEND_ERROR                 = 3
    *     USER_CANCELED              = 4
    *     OTHERS                     = 5
      IF SY-SUBRC  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDLOOP.
    ENDCASE.
    Moderator Message: Duplicate post locked. Continue with your previous thread.
    Edited by: Suhas Saha on Dec 27, 2011 9:17 AM

    HI arjun,
    according to you code,
    READ TABLE I_DATA INTO WA_DATA INDEX FU_SELFIELD-TABINDEX.
    the fu_selfield-tabindex contains only one number , so its trigger only one check box, it is not correct to loop i_data .
    take the records which are checked and loop that internal table , using check_changed_data u can select multiple records which are checked.
    one importent thing , use sy-subrc after read statement bcz see example
    in second loop if the read statement has failed but the work area contains the data , so beware check sy-subrc= 0 . after read.
    debug your program and check every time FU_SELFIELD-TABINDEX will be same . so reads same record so many time how many times the loop had.
    instead do like this
    loop at i_data into wa_data where check = 'x'.
    MOVE-CORRESPONDING WA_DATA TO WA_PRINT.
    endloop.
    Regards
    Siva

  • Dynamically creating a Record Group based on Previously entered Record Grou

    Forms [32 Bit] Version 10.1.2.3.0 (Production)
    Hi,
    I know how to dynamically create a record group based on a query and putting the code in When new form instance.
    My query is. I have a form which has multiple Record Groups and the user wants to dynamically create subsequent groups based on previous groups.
    For example
    I have a record group with selects a Location,
    when the user selects the Location from a list of values
    the 2nd record group called 'Cost Centres' will have to filter out only those with the locations selected above.
    How can I populate the 2nd record group at run-time when I do not know what site the user will select?
    If I simply populate in when new form instance as in location and just select everything, the list of values populates.
    CC field is a LIST ITEM and the list style is a POP LIST, it is not required.
    I have put the code in the Location field in the when-list-changed trigger.
    I am getting this error:
    frm-41337: cannot populate the list from the record group
    here is the code:
    DECLARE
    v_recsql Varchar2(1000); -- The SQL for creating the Record Group.
    v_recgrp RecordGroup; -- Record Group
    v_status Number; -- Return Value of Populate_Group function.
    c_where VARCHAR2(1000);
    BEGIN
         IF :location = '1' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''02'')';
         ELSIF :location  = '2' THEN
              c_where := ' substr(cost_centre,1,2) in (''02'',''03'')';
         ELSIF :location   = '3' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''11'',''07'')';
                   ELSE
              c_where :=  ' 1=1'; --EVERYTHING
         END IF;
    v_recsql := 'SELECT cost_centre, description  FROM   cost_centres  where '||c_where;
    -- Create the Record Group
    v_recgrp := CREATE_GROUP_FROM_QUERY('v_recgrp', v_recsql);
    IF NOT ID_NULL(v_recgrp)
    THEN -- No Error, record group has been successfully created.
    -- Populate Record Group
    v_status := POPULATE_GROUP('v_recgrp');
    IF v_status = 0
    THEN -- No Error. Record Group has been Populated.
    POPULATE_LIST('block.CC', 'v_recgrp');
    END IF; -- IF v_status = 0
    -- Delete the Record Group as it is no longer needed.
    DELETE_GROUP('v_recgrp');
    END IF; -- IF NOT ID_NULL(v_recgrp)
    END;thanks for your assistance.

    Hi,
    Once record status gets change for block you can not populate/repopulate the list item. Keep those list items as non-database item with different names and create different items as database orignal items. Than assign the values in WHEN-LIST-CHANGE trigger to the actual database items.
    -Ammad

  • Question on Dynamic Select Lists and Checkboxes

    Hello,
    I am new to APEX, and this is my first posting, I have a question about how to implement dynamic checkboxes from a select list.
    Basically I would have a select list, and based on what item is selected a set of checkboxes would appear.
    I was originally using the Select and Submit property on the select box, which works fine, all of the checkboxes appear appropriately. But the thing is, APEX refreshes the page each time, and since this select box is lower in the page, the user would have to scroll all the way down to where they were before.
    The main requirement is so that the user won't have to scroll down the that position where the select box is each time they select a new option.
    So a work around attempt is to create a javascript that will automatically scroll down to that position on page load ...
    i.e.
    function pageScroll() {
    window.scrollBy(0,50);
    But that didn't work, because for some reason the javascript wasn't appearing.
    Is there a way to either:
    1. Have a dynamic checkbox appear using ajax? -or-
    2. Have the javascript scrolling effect
    Sorry if this is a confusing question, I was wondering if anyone else came across this issue.
    Thanks in advance!!

    Since this Select List plays such an important role on the page, why not create a side-region and put that select list there so you don't have to overwhelm the user and his 'persistence of vision ' with a page that scrolls all by itself to the 1000th line to, then , change the options ?
    just an idea.

  • Dynamic Selection on Checkboxes?

    I want to make a new checkbox component that has the dynamic selection property capability found in the Xcelsius combo box component.  It would just tie to a cell and show checked or unchecked depending on whether the cell was a 0 or 1.
    Is that currently supported in the Xcelsius SDK and if so, can someone help me with how that would look in the propertysheet?
    From the combo box example, the way to tie "selectedItem" to the Excel is with:
    case "selectedItem":
                                  // User explicitly cleared binding, do not create another.
                                  if ((bindingID == null) || (bindingID == ""))
                                       dataInsertEditor.enabled = true;      // Re-enable manual entry.
                                       // Fill the control back with current value instead of range address.
                                       propertyValues = proxy.getProperties([propertyName]);
                                       propertyObject = propertyValues[0];
                                       dataInsertEditor.text = String(propertyObject.value);
                                       // Make sure we set the property on the component as well.
                                       proxy.setProperty(propertyName, propertyObject.value);
                                       return;
                                  // Disable the option to manually enter a value once the component is bound.
                                  dataInsertEditor.enabled = false;
                                  // Display the range address.
                                  dataInsertEditor.text = proxy.getBindingDisplayName(bindingID);
                                  // Excel spreadsheet binding:-
                                  // BindingDirection.INPUT    - update the spreadsheet when the custom component "value" changes.
                                  // InputBindings.ARRAY  - Write to multiple cells in the spreadsheet.
                                  proxy.bind("selectedItem", null, bindingID, BindingDirection.INPUT, InputBindings.SINGLETON, "");
                                  break;
    How would that change if I want to tie it as a binary value to the checkbox's checked/unchecked state?
    Edited by: Owen B on Jun 22, 2008 7:35 PM
    Edited by: Owen B on Jun 23, 2008 2:49 PM

    Hi Owen,
    You should be able to do what you want with the Xcelsius 2008 Component SDK.
    This is the line that sets up the component <--> spreadsheet binding (in this case update the spreadsheet when the component property changes).
    proxy.bind("selectedItem", null, bindingID, BindingDirection.INPUT, InputBindings.SINGLETON, "");
    To change so that the spreadsheet is also updated when the property changes do this instead:
    proxy.bind("selectedItem", null, bindingID, BindingDirection.BOTH, InputBindings.SINGLETON, OutputBindings.SINGLETON);
    Using Number or Boolean for the component property type should then work.
    Regards,
    Matt

  • How to read data after select multiple record by checkbox,

    hi experts
    i  m using simple report with check box , and itab whcih contain records
    how to read data after select multiple record by checkbox,
    thanks

    Hi Prashant,
       Try using this logic.This Code displays the list with check boxes. When you check a checkbox and press a button say 'Select All' or 'De Select all' or 'Display'. It will read the data of those records.
    DATA :
      fs_flight TYPE type_s_flight,
      fs_flight1 TYPE type_s_flight1.
    * Internal tables to hold Flight  Details                             *
    DATA :
      t_flight LIKE
      STANDARD TABLE
            OF fs_flight,
      t_flight1 LIKE
       STANDARD TABLE
             OF fs_flight1.
    SET PF-STATUS 'SELECT' .
    PERFORM selection.
    PERFORM displaybasic .
    *                      AT USER COMMAND EVENT                          *
    AT USER-COMMAND.
      PERFORM selectall .
    *&      Form  SELECTION
    *      Select query to reteive data from SPFLI table
    *  There are no interface parameters to be passed to this subroutine.
    FORM selection .
      SELECT  carrid                       " Airline Code
              connid                       " Flight Connection Number                  
        FROM  spfli
        INTO TABLE t_flight.
      DESCRIBE TABLE t_flight LINES w_lines .
    ENDFORM.                               " SELECTION
    *&      Form  DISPLAYBASIC
    *      Display the basic list with SPFLI data
    *  There are no interface parameters to be passed to this subroutine.
    FORM displaybasic .
      LOOP AT t_flight INTO fs_flight.
        WRITE :
             w_check AS CHECKBOX,
             w_mark,
             fs_flight-carrid UNDER text-001,
             fs_flight-connid UNDER text-002.
      ENDLOOP.                             " LOOP AT T_FLIGHT..
      CLEAR fs_flight-carrid .
      CLEAR fs_flight-connid.
    ENDFORM.                               " DISPLAYBASIC
    *&      Form  SELECTALL
    *      To check all the checkboxes with a 'selectall' push button
    *  There are no interface parameters to be passed to this subroutine.
    FORM selectall .
      CASE sy-ucomm.
        WHEN 'SELECT_ALL'.
          w_check = 'X'.
          w_line = 4 .
          DO w_lines TIMES.
            READ LINE w_line .
            MODIFY LINE w_line FIELD VALUE w_check .
            ADD 1 TO w_line .
          ENDDO.                           " DO W_LINES TIMES
          CLEAR w_line.
        WHEN 'DESELECTAL'.
          w_check = space.
          w_line = 4 .
          DO w_lines TIMES.
            READ LINE w_line FIELD VALUE w_mark .
            IF w_mark = space .
              MODIFY LINE w_line FIELD VALUE w_check .
            ENDIF.                         " IF W_MARK = SPACE
            ADD 1 TO w_line .
          ENDDO.                           " DO W_LINES TIMES
        WHEN 'DISPLAY'.
    IF sy-lilli BETWEEN 4 AND w_lines .
        DO w_lines TIMES.
          READ LINE w_num FIELD VALUE w_check INTO w_check
                                     fs_flight-carrid INTO fs_flight-carrid
                                     fs_flight-connid INTO fs_flight-connid.
          IF sy-subrc = 0.
            IF w_check = 'X'
              SELECT  carrid
                      connid
                      fldate               " Flight date
                      seatsmax             " Maximum capacity in economy
                      seatsocc             " Occupied seats in economy class
                FROM  sflight
                INTO  TABLE t_flight1
               WHERE  carrid = fs_flight-carrid
                 AND  connid = fs_flight-connid.
              LOOP AT t_flight1 INTO fs_flight1.
                WRITE :
                  / fs_flight-carrid UNDER text-001,
                    fs_flight-connid UNDER text-002,
                    fs_flight1-fldate UNDER text-007,
                    fs_flight1-seatsmax UNDER text-008,
                    fs_flight1-seatsocc UNDER text-009.
              ENDLOOP.
            ENDIF.                         " IF SY-SUBRC = 0
          ENDIF.                           " IF W_CHECK = 'X'.
          ADD 1 TO w_num.
        ENDDO.                             " DO W_LINES TIMES
        CLEAR w_check.
        w_num = 0.
      ELSE .
        MESSAGE 'INVALID CURSOR POSITION ' TYPE 'E' .
      ENDIF.                               " IF SY-LILLI BETWEEN..
    ENDCASE.                             " CASE SY-UCOMM
    ENDFORM.                               " SELECTALL
    Much Regards,
    Amuktha.

  • Please Help! Deleting multiple record by using checkbox selected

    Hello everybody,
    I am a new to JSP. I really don't know how to delete multiple record by using checkbox selected and pressing submit button.
    For example, deleting webmailbox letters using checkbox selected and delete button. The mail we checked will delete from the inbox.
    I like to use my user account deleting system of my project like above example.
    How can I do in JSP? I will very please you if you share you knowledge and code for me.
    If you have URL address, could you share me for reference?
    Please help me...
    With Thanks and Regards,
    wtdahl

    Take a look at this thread, I thing it answers your question quite good:
    http://forum.java.sun.com/thread.jsp?thread=516658&forum=45&message=2463505

  • How to show the columns dynamically in OBIEE report based on the selection?

    Hi,
    I have a requirement where the columns should be dynamically shown in report based on what we select in propmt page.
    I'm creating a report in OBIEE where i want to give an option to the end user to select the columns whichever he wants to see in the report.
    For example I have the following columns in the report already:
    Customer Name,
    Customer Number,
    Bank Account,
    Address
    I want to give an option to the user to select 'Customer Mail ID' dynamically and see the column to be displyed in the report along with the existing columns.
    Through 'Column Selector' user can select a single column at a time, but if he want to select more than one column, how can we do this ?
    Please help me out in resolving this issue.
    Thanks,
    Chaithanya.

    Hi Chaithanya,
    there's not a straight solution for this. You can create different analysis containing different number of columns and then directing the user to this analysis using Action Links or you can also use View Selector to switch from one view (analysis) to the other. But it's not going to be very flexible nor dynamic.
    J.

Maybe you are looking for

  • Not to display certain data in cloums

    I have column name project in the BIP rtf template. When run, it has fields like -unspecified 0000016772 983000000 -unspecified -unspecfied When i run the report I dont want to display all rows which shows -unspecified. I dont want to delete the row

  • Auto Save and Versions

    Where can I control Auto Save and Versions? I can't find it in System Settings. Can I control it by terminal commands? On http://www.apple.com/macosx/what-is/ Apple claims: Versions creates a new version of a document each time you open it and every

  • Can I Stream just the video and Sync everything else?

    Does anyone have any solid solutions for having full access to a 500+ GB iTunes Library on the TV ? I have 500 GB of video on an external drive and ~50 GB of music and photos on my internal drive. In other words, my iTunes library is not consolidate

  • 2006 Mac Pro & EFI Firmware Update 1.2

    Wondering if anyone has any thoughts on this... Just upgraded to Snow Leopard and was prompted to apply the EFI Firmware Update 1.2... so I did as requested... MP shuts down and I hold down the power button until I see the power light pulse rapidly..

  • User exit to change the deliveries in self-billing

    Hi abapers i have a problem with badis In the transaction VSB1 i have the badi BADI_SBWAP. in this i have a method DELIVERY_DETERMINE_2. i want to write the code to change the deliveries in that method. since the required data to validate the VBELN i