Issue of Apex_item. CheckBox

Hello
I created a report of the apex using apex_item.checkbox and apex_item.hidden, the source code looks similar to below:

Select
apex_item. Hidden (3, article_site).
apex_item. CheckBox (1, article_id, "onchange = 'spCheckChange (this)' ',: f_article_id, ' :') checkbox,")
article_id,
article_site,
article_creationdate
a articles
where article_id = decode (v ('P2_article_id'), cm, article_id, v('P2_article_id'))
and article_site = decode (v ('P2_article_site'), ", article_site, v('P2_article_site''));

Example of report looks at below

checkbox article_id, article_site, article_creationDate
1 yahoo.com 20/10/2010
Google.com 2 10/21/2010
MSN.com 3 22/10/2010

what I want, this is when a user selects the check box to select the records, insert selected article_id, article_site to another table called articles_2, so I created a process:

Begin
Because me in 1.apex_application. G_F01. Count
Loop
Insert into articles_2 (article_id, article_site)
Values (apex_application. G_F01 (i), apex_application. G_F03 (i));
End loop;
End;

If I check all items, the process will loop through each record and insert the selected records in the table of articles_2 properly.

But if I check only article 2, the article_id 2, then the process gets the right article_id but bad article_site values, for example.
It inserts article_id = 2 and article_site = yahoo.com in the articles_2 table.

Does anyone know what was wrong with my code?
Thanks in advance.

Hi user8870431 (please tell us your name).

I don't know how your current process can work, but you must specify an index in the tables of G_Fxx, like this:

BEGIN
  FOR i IN 1..apex_application.G_F01.count LOOP
    INSERT INTO articles_2 (article_id, article_site) VALUES (apex_application.G_F01(i), apex_application.G_F03(i));
  END LOOP;
END;

Hope this helps,
John

If you find this information useful, please do not forget to mark the 'useful' or 'correct' post so that others benefit as well.

Tags: Database

Similar Questions

  • read apex_item.checkbox in a javascript script

    Hi people,

    I have a page of report of popup with a report of checkbox

    Select apex_item.checkbox(1,empno) tur,

    Ename,

    job

    EMP;

    The user can click on the checkbox and give the button submit. I need to pass the value of the checkbox on the page parent via JavaScript. I know that the way to get the value of the item through JavaScript

    Text1 = $v ("P4_COMMENTS");

    But I don't know how to get all the item clicked is a Java variable. I even tried

    < script >

    function i() {}

    AV = document.getElementById ("G_F01");

    Alert (AV);

    }

    < /script >

    Document.GetElement does not work in this case.

    Please let me know how to extract the

    Article apex_item. CheckBox checked in a JavaScript rather than PL/SQL block.

    Thank you in advace

    knockaert

    Hello

    Place the following script on the popup page to get the values back to page 1. Make sure that you call the javascript returnCheckedVals function by clicking on the submit button.

  • Problem with apex_item.checkbox

    Dear friends,

    I m create a checkbox in interactive report through the query below.

    Select apex_item.checkbox(1,EMPNO,'UNCHECKED') "', ENAME from EMP '"

    But the result is < input type = "checkbox" name = "f01" value "7369" UNCHECKED = / > instead of the check box.

    I use apex 4.1 with oracle 10g, considering that this query works perfectly in the apex 3.2

    Can any1 please help me about this?

    Concerning
    Kamran

    Hello

    Go change your report and then change this column. Change ' display as ', 'report type Column.

    Kind regards
    Jari

    http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0

  • Increase the size made of apex_item.checkbox?

    Hello
    I display a SQL report, including an apex_item.checkbox, this is for use on a Tablet, so I would like to be able to increase the size of boxes that are displayed, to make them easier to select. Can I do this with the help of p_attributes or another way?

    Thank you

    Mike

    Mike, UK says:
    I display a SQL report, including an apex_item.checkbox, this is for use on a Tablet, so I would like to be able to increase the size of boxes that are displayed, to make them easier to select. Can I do this with the help of p_attributes or another way?

    You can try:

    ...
    p_attributes => 'style="width: 2em; height: 2em;"'
    ...
    

    or use a sheet of style with a selector for the box or column:

    /*
      Not IE6 or IE7/8 in quirks mode
    */
    input[type="checkbox"] {
      width: 2em;
      height: 2em;
    }
    

    Note, however, that support for the style box size varies greatly between browsers/versions.

  • Dynamic element appears in the reports - apex_item.checkbox

    Hi all

    I want to add a Checkl box to a report, and then select columns. So I used under query for this report.
    SELECT apex_item.checkbox(1,Cus_ID) DELROW,
    Cus_ID Customer_Id,
    Cus_Name Customer_Name
    FROM Customer_List
    But when I use top query and run the report, rather than view the check box on the report it shows simple HTML code for the box under column DELROW.

    This is an example
    <input type="checkbox" name="f01" value="2000" />
    Any idea?

    change the region of reoport, then change to standard column.

  • Add lines to the slot table with apex_item.checkbox form?

    Hello

    I created a data manipulation process to add a line in a tabular presentation. The problem is that I have a few boxes and when I click on the button to call the procedure for adding line is not
    create one of the only text fields. Is anyway for me to create the checkboxes in this way?

    Thanks in advance!

    Hello

    Take a look on Re: Add a line in the detail table when the checkbox is enabled on a table of master report clone an entire line so it should include check boxes. Just make sure that ypu run updateInputs() or something similar to make sure that all the boxes have unique attributes "name".

    Andy

  • apex_item. CheckBox on a report

    Hi all
    I use apex_item.checkbox for a column in my report. But during the execution of the page, I see that we can change the check box on the report. I want "* show only *" on the reports so that users cannot modify.

    Thank you
    Lucy

    I personally recommend investing in a query builder that has syntax highlighting. I bet that sql Developer (free Oracle) has it as well. If you look at a query in one of these tools, you will immediately see the issue.

    Within a string, the strings must be escaped - the traditional way is to put the 2 single quotes for each regular single quote. There is also a feature called q introduced in 10G that you could use, but I personally never got the hang of it.

    It work?

      v_sql :=  v_sql || 'DECODE(column, '''||v_y||''', '''',
                          null, '''') as Hotline, ';
    
  • apex_item. CheckBox validation

    Hi team,

    I had created an interactive report in which I had created to check by using apex_item.checkbox.

    I need a validation in Java script, could you please help me on this.

    Validation required.

    In my form, I have a button, if they do not selected the check box and click on the button, so I have to manage based on java script to select at least one check box and click the button for treat more.

    Could you please help how we can achieve this.

    Kind regards

    Sruthitamiri

    Hi Nanoo Tamiri,

    You can do this by using javascript

    assuming that f40 is the id of your checkbox field

    replace the f40 with your own

    Gives you sample code, change according to your requirement.

    1. change your page-> header HTMl

    function f_check() {
        var count = 0;
        count = $('input[name="f40"]:checked').length;
        if (count == 0) {
            alert('No checkbox is selected, please select atleast one checkbox.');
        } else {
            apex.submit({ request:"SUBMIT"});
        }
    }
    

    2. change your button

    Action : Redirect to URL
    URL : javascript:f_check();
    

    Hope this helps you,

    Kind regards

    Jitendra

  • apex_item. CheckBox

    Hi all

    I use APEX 4.2 and IE8.

    I need a little help. I am trying to disable a check box value below is my code, but the question is always enabled. Am I missing something?

    apex_item.checkbox(1,imm_document_type.id,'disabled=disabled;','CHECKED',NULL)
    Thank you

    In my view, that the value of your property is false. Try this:

    apex_item.checkbox(1,imm_document_type.id,'disabled="disabled"','CHECKED',NULL)
    

    Edit:
    Try the following code

    apex_item.checkbox(1,2,'disabled="disabled" checked="checked"','CHECKED',NULL)
    

    Prime does not box set to checked, but the other does.

    Published by: chrdei on 10.12.2012 12:54

  • problem of apex_item. CheckBox

    Hi all:

    I have a problem to add a checkbox control to my report, I use the api apex_item.checkbox. I've seen many examples of how do and I tried different ways, but when I run the report does not display the box, it seems * < input type = "checkbox" name = "f01" value = "1" / > *.

    I think I'm doing something wrong, but I can't see it.


    The SQL I use is this:
    SELECT     apex_item.checkbox(1,ca.cod_caso) checkbox,
               ca.cod_caso,
               ca.codigo_alterno,
               ca.descripcion desc_caso,
               cl.nombres_apellidos cliente,
               SUM (aca.duracion / 60) duracion,
               SUM (aca.valor) valor
        FROM   act_caso ca, act_nombre_cliente cl, act_actividad_caso aca
       WHERE       ca.cod_cliente = cl.cod_cliente
               AND ca.cod_caso = aca.cod_caso
               AND aca.fecha >= '01-MAY-2011'
               AND aca.cod_prefactura IS NULL
    GROUP BY   apex_item.checkbox(1,ca.cod_caso),
               ca.cod_caso,
               ca.codigo_alterno,
               ca.descripcion,
               cl.nombres_apellidos
    I m using Apex 4.0.2.00.08 and Oracle XE 11 g.

    concerning


    Gerard

    In the attributes of the report, change the column definition. Change the Type of display to Standard report column.

  • Trying to put an APEX_ITEM. CHECKBOX with JavaScript

    I have a PL/SQL region that gives the user five blank lines. When the user enters an item # I have JavaScript validate the item # against our current list of products. If the item # is not found the user has the possibility to indicate that the element # entered must become a new element. In this case, I want to put a checkbox in the area to check.

    The box is created as an apex_item.checkbox and each of them (in each row) has a identifier unique, e.g. new_item_1, new_item_2, etc. In the JavaScript code, I can see the value of a check box specified using alert ("checkbox value is" + $v (new_item_1)); or something similar. However, $s (new_item_1, "CHECKED"); does not the box to checked as expected.

    What is the correct syntax for 'check' a dynamic check with JS?

    Thank you

    Gregory

    Gregory,

    You can use normal JS to check the box...

    document.getElementById("itemID").checked = true;
    
    or
    
    $x("new_item_1").checked = true;
    

    See you soon,.
    Hari

  • Clear the check box to a report using APEX_ITEM. CHECKBOX

    Hi friends,

    I try to view my report with a checkbox control whose value of the column as "Y" or "n" in the table.
    My query is as below:
    SELECT APEX_ITEM.CHECKBOX(1,advertised,'disabled=disabled;' ||DECODE(advertised,'Y','CHECKED', 'UNCHECKED')) "Advertised Flag"
       FROM xyz;
    Report shows all checkboxes unchecked and UNCHECKED regardless of the value of column ANNOUNCED (Y or N).
    Any suggestions that I am doing wrong in the query.

    Thank you
    Raj.

    Well,.

    1. you have not said that

    2. remove the CASE and you will get all of the disabled.

    3. your code was wrong about the input parameters for the apex_item.checkbox function.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • apex_item only not corrent value picking...

    Hi all..

    I have a strange issue with the apex_item.
    Don't know what I'm doing wrong.

    Please check the following example.

    http://Apex.Oracle.com/pls/Apex/f?p=64999:1

    In my case the "no column" can be null or not null, but the name"" column.
    always have the value.

    My top report has the following code...
    select APEX_ITEM.CHECKBOX(1,test_name,'UNCHECKED')||
     APEX_ITEM.hidden(2,test_NAME_NO)||APEX_ITEM.hidden(3,test_NAME) test_name_no_check,
     test_name_no,test_name
      from test_src
    The problem is...

    Please select "' 2nd or 3rd registration (only 1)'" with a null value in the "no column" and click on submit.

    surpriseingly... It becomes the bad no value to the target. Whenever this is by default the "'no value' ' to 1.

    He is picking up ""no incorrect value ""...

    This is the process code I have...
    please consider this..
    I cannot change my table structure and i cannot use rowid
    these are the limitations that i have
    begin
    delete from test_tgt;
    commit;
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT
      LOOP
        
        INSERT
        INTO test_tgt
             (
            test_name_no,
            test_name
          )
          VALUES
          (
            APEX_APPLICATION.G_F02(i),
            APEX_APPLICATION.G_F03(i)
          );
      END LOOP;
    commit;
    end;
    Please check the code with the following credentials...

    Application name: apex_item Test
    Workspace: kumar2003
    username:test_user
    password: jari

    Please help with this question...

    Kumar, Excsue me. I'm not close enough.

    I would say that the code I posted is correct, but you'd also a change of the checkbox item in your query

    FROM
    select APEX_ITEM.CHECKBOX(1,test_name,'UNCHECKED')||
     APEX_ITEM.hidden(2,test_NAME_NO)||APEX_ITEM.hidden(3,test_NAME) test_name_no_check,
     test_name_no,test_name
      from test_src
    
    TO
    
    select APEX_ITEM.CHECKBOX(1,rownum,'UNCHECKED')||
     APEX_ITEM.hidden(2,test_NAME_NO)||APEX_ITEM.hidden(3,test_NAME) test_name_no_check,
     test_name_no,test_name
      from test_src
    
    Note the change from test_name to rownum in the 2nd query.
    

    It is only verified because lines manual tabular form will be in the order of dense as you treat but actually checked lines wiil not.

    Example 3 lines, check row 2 and 3

    APEX_APPLICATION. G_F01. NUMBER will be equal to 2, however the values that you want for your insert are found in rows 2 and 3. I use G_F02 and G_F03 index, you get 1 and 2, not 2 and 3, you need. By configuring rownum in your creation of the checkbox, you now have the possibility of obtaining 2 and 3 by referring to APEX_APPLICATION. G_F02 (apex_application_g_f01 (i))

    apex_application_g_f01 (i) = 2 in this example when I = 1.

    Here is another simple example reference.
    http://www.DBA-Oracle.com/HTMLDB/t_htmldb_check_boxes_reports_regions.htm

    Also in this manual in the form of table example, you cannot sort the records using the column header sort. If you need to sort, you would in the query with the Order By statement. This is from my experience using manual tabular to the point 3.2. In 4.1, I always use tabular shapes Apex.

    Forms tabular apex 4.1 removes this restriction.

    Published by: Bob37 on March 29, 2012 12:19

  • Need help with setting up in checkbox in interactive reports

    I need help with setting up in checkbox in interactive reports, I use this statement a query

    SELECT apex_item.checkbox

    (

    1, ROLEID,

    'onchange = "spCheckChange (this);". ',

    : F_ROLEID_LIST,.

    ':'

    ), del.

    ROLEID, ROLEDESCRIPTION

    OF EBA_ROLES

    When I run it I get the following

    < input type = "checkbox" name = "f01" value = "1" onchange = "spCheckChange (this); ' / > instead of the checkbox

    Do I need to configure anything else

    Aditya Gupta wrote:

    I need help with setting up in checkbox in interactive reports, I use this statement a query

    SELECT apex_item.checkbox

    (

    1, ROLEID,

    'onchange = "spCheckChange (this);". ',

    : F_ROLEID_LIST,.

    ':'

    ), del.

    ROLEID, ROLEDESCRIPTION

    OF EBA_ROLES

    When I run it I get the following

    instead of the checkbox

    Do I need to configure anything else

    This is one of the most frequently asked questions in this forum. Set the column attribute the text to display as Standard report column and not display text (special escape characters).


    Always include the information referred to in these guidelines when you ask a question and if you use APEX 5.0, State, if you develop using the pages or the view of the component designer.

  • More than 1 SQL query with checkbox and error invalid number report

    Hi all

    I have two SQL query reports that each has an apex_item.checkbox and two processes for each report.  A report/process works very well.  It gives me an error of invalid number.

    In addition, another query SQL (editable report) gives me the following error when using the Multi line process, delete.

    ORA-06502: PL/SQL: digital or value error: character number conversion
    error ORA-06502: PL/SQL: digital or value error: character number conversion
    error
    Ok

    When I got a report from SQL query (with box and a process) and the query SQL (editable report) everything worked.  It stopped working when I added another SQL query report (with box and a process).

    A SQL query has the following in my query: apex_item.checkbox(3,email_id,'UNCHECKED') ""

    The other SQL query has the following: apex_item.checkbox(2,b.file_id,'UNCHECKED') ""

    Any help will be greatly appreciated,

    Sylvia

    Hi Reema,

    I've recreated the region and now it works!

    Thank you for this, looking at

    Sylvia

Maybe you are looking for