JQuery and the row selector column.

I have a tabular form which i'm running some validation against.
I'm using the row selector to indicate rows which are to be deleted.
Now i've deleted rows using the method below, that's fine.
DECLARE
rows_int integer;
Err_message varchar2(50);
BEGIN
FOR i IN 1..apex_application.g_f01.COUNT LOOP
DELETE
FROM com_transactions
WHERE ID = apex_application.g_f02(NVL(apex_application.g_f01(i),0));
END LOOP;
END;
However when i try to use JQUERY for the validation things go awry.
$('input[name="f01"]').each(function(j)
if($(this).val().length > 0)
{   row_var = $(this).val();
$('input[name=f06]:eq('+(row_var)+')').val(' DELETE ROW '+ row_var);
Now there's a mis allignement on the returned values j = 0 returns the values in row 1 when using pl sql, but that's fine.
The problem is that in the plsql block only the rows with a tick against them are returned but in the jquery every row is returned regardless of if it's been ticked or not.
Any ideas please folks?
Thankyou
JH.

Having done a bit more research i was accessing the item incorrectly and needed to use the following syntax.
$('input[name=f01]:checked').each( function(){
JH.

Similar Messages

  • Apex 3.0 to 3.2, Updateable Reports & Row Selector Column?

    Good afternoon,
    (I searched the forum for both of these topics but didn't find an answer, it may be there and I missed it. If so, just point me in the right direction if you don't mind.)
    We just upgraded from 3.0.1.00.07 to 3.2.0.00.27.
    In 3.0 there was the option to select 'SQL Query (updateable report)' as a report type. I don't see that available now. What am I doing wrong?
    Also in 3.0, I would add a Row Selector column to a report by selecting 'SQL Query (updateable report)' as a report type, then clicking Row Selector in a side region to the right to add a row selector column, then I would change the report type back to SQL Query and the row selector column would remain. In 3.2 how do I get a row selector column added to a report?
    Thx, Tony

    But, yes, it can be installed with Forms & Reports Standalone. The http server with F&R ships with modplsql; that's all you need. Just configure a DAD as described in the documentation for setting it up with App Server.
    Anton

  • Is there a way to programmatically check the Row Selector for a row?

    Greetings,
    I have a report that has the Row Selector column. I am processing the rows that are checked by the user when they click a button, so I am already looping thru FOR ii IN 1 .. Apex_Application.g_f01.COUNT.
    I need some of the rows to always be processed in the loop, so I would like to:
    1. have certain rows checked automatically. Is that possible?
    2. using the same logic that automatically checks certain rows I would also like to insure they stay checked, or are process in the loop. (You know, I may automatically check certain rows, but the user may uncheck them.) So, even if the user doesn't check them, I would like to programmatically check them before the FOR ii IN 1 .. Apex_Application.g_f01.COUNT looping occurs.
    3. If it is possible to prevent the unchecking of a row that is automatically checked it would be awesome and would mean that requirement 2 is moot. If that's possible let me know. That would be sweet. :-)
    I hope that makes sense, and that you understand what I need to do. If not, let me know.
    Thanks in advance for your help, Tony

    Hi Shunt,
    That's a great help ! ! ! Thanks much ! ! ! :-)
    I did some additional research from what you told me, and I found out that the apex_item.checkbox is a page item and it is included in the SQL that builds a report. Your code got me on the right track. That's great. Also, it's great to know I can do what I need. My next question is 'How do I get there from here?' :-)
    I built my current report using the report builder, then used the trick to change it to a type of 'SQL Quey (updatable report)' just so I could click the setting to add the checkbox column, then I set the type back to 'SQL Query'. So, I don't have apex_item.checkbox in my SQL. I guess Apex (thru its magic) prepends it to the SQL somewhere along the way. What do I need to do now?
    Do I need to rebuild the report without using the above 'trick' and code the checkbox into my SQL myself? Or, can I just add it to the existing SQL? Or, with that cause 2 checkboxs to be on the report (mine and the one Apex generates)? That's one set of questions. :-)
    Also, whether the checkbox is checked (and disabled) is based on a value in the table the SQL is running over. Would it be possible to put a subselect, or something along those lines, in the main SQL (that has the checkbox item) that would programmatically check the checkbox?
    Sorry for my newbie questions, but I'm relatively new to Apex and PL/SQL, so there's still a lot I have to learn. All you need to do is point me in the general direction and I'll take it from there. I just want to know the right way to go about this before I start coding. :-)
    To give you and idea of what I'm doing now and want to do I have my simple SQL below:
    = = =
    select
    ecn_approval_master_id, mandatory, approval_type,
    htmldb_item.hidden(50,ecn_approval_master_id) idalias
    from
    ecn_approval_master
    where ecn_plant_master_id = :P0_PLANT
    order by mandatory DESC, approval_type
    = = =
    The 'mandatory' column contains 'Y' or 'N'. If it is 'Y' I want the checkbox to be checked and disabled. If it would help in the coding I could have the values of the mandatory column 'Y' and NULL. But, I'm not sure if it will help, because it looks like the checked rows are listed in parm 4. Then, when the htmldb_application.g.f10.count.... routine processes the selected they mandatory ones will automatically be processed. Course, you probably figured that out already.
    Thanks, Tony

  • How to create a report region which the first colomn is row selector column

    I want to create a report region and its first column is a row selector column. I have used select sentence to select some columns. But I do not know how set the first column to row selector column. I mean I want to do as follow. When a radio which is first column is chosen, it will return it's value of the column in the chosen row. Please help me! Thanks

    Hi unnamed,
    Suppose you have an id that identifies your record.
    Go to Report definiton, tab report attirbutes.
    Select the id of your record.
    Create a link to the page you want to go to.
    Hope this helps.
    If not, I suggest you to create a from with report, and analyze the way the wizard has generated it.
    Leo

  • How do I turn off the curvature tool in CC, I chose the selection tool to create a box and the middle selector that allows you to adjust the size has disappeared?

    How do I turn off the curvature tool in CC, I chose the selection tool to create a box and the middle selector that allows you to adjust the size has disappeared? My coworker discovered making ti a compound path by right clicking it and selecting it. All I want to do is adjust the size of a box. please advise.

    You should post questions about using applications in the specific application's forum(s).
    Here is a link to a page that has links to all Adobe forums...
    Forum links page:
    https://forums.adobe.com/welcome

  • How can I display the rows into columns.

    How can I display the rows into columns. I mean
    Create table STYLE_M
    (Master varchar2(10), child varchar2(10));
    Insert itno style_m
    ('MASTER1','CHILD1');
    Insert itno style_m
    ('MASTER2','CHILD1');
    Insert itno style_m
    ('MASTER2','CHILD2');
    Insert itno style_m
    ('MASTER3','CHILD1');
    Insert itno style_m
    ('MASTER3','CHILD2');
    Insert itno style_m
    ('MASTER3','CHILD3');
    Note : The Master may have any number of childs.
    I want to display like this..
    Master child1, child2, child3, .......(dynamic)
    MASTER1 CHILD1
    MASTER2 CHILD1 CHILD2
    MASTER3 CHILD1 CHILD2 CHILD3
    Sorry for disturbing you. Please hlp me out if you have any slution.
    Thanks alot.
    Ram Dontineni

    Here's a straight SQL "non-dynamic" approach.
    This would be used if you knew the amount of children.
    SELECT
         master,
         MAX(DECODE(r, 1, child, NULL)) || ' ' || MAX(DECODE(r, 2, child, NULL)) || ' ' || MAX(DECODE(r, 3, child, NULL)) children
    FROM
         SELECT
              master,
              child,
              ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r
         FROM
              style_m
    GROUP BY
         master
    MASTER     CHILDREN                        
    MASTER1    CHILD1                          
    MASTER2    CHILD1 CHILD2                   
    MASTER3    CHILD1 CHILD2 CHILD3             Since you said that the number of children can vary, I incorporated the same logic into a dynamic query.
    SET AUTOPRINT ON
    VAR x REFCURSOR
    DECLARE
            v_sql           VARCHAR2(1000) := 'SELECT master, ';
            v_group_by      VARCHAR2(200)  := 'FROM (SELECT master, child,  ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r FROM style_m) GROUP BY master';
            v_count         PLS_INTEGER;
    BEGIN
            SELECT
                    MAX(COUNT(*))
            INTO    v_count
            FROM
                    style_m
            GROUP BY
                    master;
            FOR i IN 1..v_count
            LOOP
                    v_sql := v_sql || 'MAX(DECODE(r, ' || i || ', child, NULL))' || ' || '' '' || ';
            END LOOP;
                    v_sql := RTRIM(v_sql, ' || '' '' ||') ||' children ' || v_group_by;
                    OPEN :x FOR v_sql;
    END;
    PL/SQL procedure successfully completed.
    MASTER     CHILDREN
    MASTER1    CHILD1
    MASTER2    CHILD1 CHILD2
    MASTER3    CHILD1 CHILD2 CHILD3I'll point your other thread to this one.

  • Capturing the row selector and perform logical delete

    Hi All ,
    I add a tabular report in one of my page .But in the MULTI_ROW_DELETE button I like to capture the checkbox (row selector) and fire a PL/SQL anonymous block where rather than performing actual row delete it will update a database field and perform some sort of logical delete .
    Now my problem is I cant able to capture that what are the rows need to be logically deleted :
    DECLARE
    vRow BINARY_INTEGER;
    BEGIN
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    vRow := apex_application.g_f01(i);
    update test123 set delete_flag='y' where col2=vRow ;
    end loop;
    end;
    Its throwing error .Can anyone help on this pls how to write the pl/sql code to perform the logical delete.
    Thanks in advance ,
    Regards,
    Debashis.

    Guys ,
    Got the solution by searhcing several of the therads from Denes...
    Create the checkbox from Form page :
    htmldb_item.checkbox(1,t.USERNAME) DeleteItem,
    and then captured it as :
    FOR i in 1..HTMLDB_APPLICATION.G_F01.count
    LOOP
    UPDATE table1 set DELETE_FLAG='Y'
    WHERE USERNAME = HTMLDB_APPLICATION.G_F01(i);
    END LOOP;
    Cheers,

  • Can't omit both the rowset and the row element?

    consider the simple document below. Notice that row-element and
    rowset-element are both empty, so neither type of element will
    be generated. Also notice that the xsql:query tag is embedded in
    other tags.
    I get "oracle.xml.sql.OracleXMLSQLException: The row enclosing
    tag or the row-set enclosing tag is ommitted; consequently to
    get a well formed XML document, the result can only consist of a
    single row with multiple columns or multiple rows with exactly
    one column each." However, in reality the result will be a valid
    XML document because I enclosed the query in a single top-level
    <table> tag. So the error checking code in the XSQL servlet is
    generating a generating a false positive (that is, seeing an
    error that isn't there).
    My question is, how can I work around this problem? I know I can
    let the servlet generate a rowset element and use an XSLT
    stylesheet to remove it but is there a another way?
    Thanks,
    Brian
    By the way, the "numbers" table contains the numbers 1-1,000,000
    and so it can be used to generate multiple copies of the output
    of any query. In this example, I expect to get 55 <th> tags in
    the output (yes, my HTML table is really that wide), all nested
    in a single <tr> tag which is nested inside a single <table> tag.
    <table connection="XXX"
    xmlns:xsql="urn:oracle-xsql"
    xmlns='http://www.w3.org/1999/xhtml'>
    <tr><th rowspan='2'>ID</th>
    <xsql:query rowset-element=''
    row-element=''>
    <![CDATA[
    SELECT 'fvc'          AS "th"
              , 'fev1'     AS "th"
              , 'fef25_75'     AS "th"
              , 'fev1/fvc'     AS "th"
              , 'vc'          AS "th"
              , 'tlc'          AS "th"
              , 'rv'          AS "th"
              , 'frc_n2'     AS "th"
              , 'frc_pl'     AS "th"
              , 'erv'          AS "th"
              , 'dlco'      AS "th"
         FROM numbers
         WHERE n < 5
    ]]>
    </xsql:query>
    </tr>
    </table>

    In XML, single quotes are equivelent to double quotes. This
    enables you to have attribute values like "That's Neat" and
    'About 2" Long'.
    The problem is that an xsql query can only return a tree as a
    fragment (e.g. there must be one root element). I think this is
    too restrictive.

  • Transpose of columns to rows (unpivoting) and not rows to columns

    Hi,
    I am right now using oracle 10g. I HAVE the following specification. Here I specified only 5 columns.
    We have upto 200 columns.
    TRANS_ID      PORTFILIO_NUM     TICKER          PRICE     NUM_SHARES ........................................
    2     100     MO      25.00     100 ........................................
    3     100     MCD          31.50     100 ........................................
    I want the above to be transformed into the following output .
    TRANS_ID TYPE VALUE
    2 PORTFILIO_NUM 100
    2 TICKER MO
    2 PRICE 25.00
    2 NUM_SHARES 100.
    I don't want to use case/decode function by hard coding the 200 columns.
    Can anyone provide me a good way (mostly dynamic way) of doing this?
    I searched the whole forum and also other forums. Everywhere I could find
    rows to columns / columns to rows where the column names have been hardcoded.
    I want a dynamic way of doing it. Let me know if u need any other inputs.
    DDL :
    CREATE TABLE PORT_TRANS
    TRANS_ID VARCHAR2(100 BYTE),
    PORTFILIO_NUM VARCHAR2(100 BYTE),
    TICKER VARCHAR2(100 BYTE),
    PRICE VARCHAR2(100 BYTE),
    NUM_SHARES VARCHAR2(100 BYTE)
    INSERT INTO PORT_TRANS (TRANS_ID,PORTFILIO_NUM,TICKER,PRICE,NUM_SHARES)
    VALUES('2','100','MO','25.00','100');
    INSERT INTO PORT_TRANS (TRANS_ID,PORTFILIO_NUM,TICKER,PRICE,NUM_SHARES)
    VALUES('3,'100','MCD','31.50','100');
    COMMIT;
    Thanks,
    Priya.

    Hi,
    What you're trying to write is something like this:
    WITH     cntr     AS
         SELECT     LEVEL     AS n
         FROM     dual
         CONNECT BY     LEVEL     <= 4
    SELECT     p.trans_id
    ,     CASE
              WHEN  c.n     <= 2
              THEN
                   CASE     c.n
                        WHEN 1     THEN 'PORTFILIO_NUM'
                        WHEN 2     THEN 'TICKER'
                   END
              ELSE
                   CASE     c.n
                        WHEN 3     THEN 'PRICE'
                        WHEN 4     THEN 'NUM_SHARES'
                   END
         END     AS type
    ,     CASE
              WHEN  c.n     <= 2
              THEN
                   CASE     c.n
                        WHEN 1     THEN p.PORTFILIO_NUM
                        WHEN 2     THEN p.TICKER
                   END
              ELSE
                   CASE     c.n
                        WHEN 3     THEN p.PRICE
                        WHEN 4     THEN p.NUM_SHARES
                   END
         END     AS value
    FROM          port_trans     p
    CROSS JOIN     cntr          c
    ORDER BY     p.trans_id
    ,          c.n
    ;I wrote this as if CASE could only handle 2 choices, rather than 128, just to show how to nest CASE expressions.
    What you have to do is write the CASE expressions, based on the contents of all_tab_columns.
    In your sample data, all of the columns are VARCHAR2 (another design flaw). If you have any columns of other types, use TO_CHAR to convert them to VARCHAR2; that is, the final code to be run will have something like:
    ...                    WHEN 4     THEN TO_CHAR (p.NUM_SHARES)If I had to do this, I might run several queries on all_tab_columns, each producing one script, containing just a fragment of the query.
    To run the whole thing, I would hard-code a main query like this
    WITH     cntr     AS
         SELECT     LEVEL     AS n
         FROM     dual
         CONNECT BY     LEVEL     <=
                        @num_columns.sql
    SELECT     p.trans_id
    ,     CASE
              @type.sql
         END     AS type
    ,     CASE
              @value.sql
         END     AS value
    FROM          port_trans     p
    CROSS JOIN     cntr          c
    ORDER BY     p.trans_id
    ,          c.n
    ;As with any coidng, start small and take baby steps. Maybe the first step would just be to write num_columns.sql, which just contains the number 4. When you can do that, hard-code the CONNECT BY query, calling num_columns.sql.
    Good luck!

  • Row Selector column on Interactive Report

    Hi all,
    I have an interactive report based on a custom SQL query. How do I add a row selctor column so I cans select individual rows? I have also tried using a tabular form which also does not display a row selctor column. This is odd as my other tabular forms display a row selctor column.
    Many thanks for you help,
    Chris

    Chris,
    Usually when someone wants a row selector, it's to choose a few rows by clicking a checkbox, then doing something with them. I'm guessing that's what you're looking for?
    Martin Giffy D'Souza's [blog post|http://apex-smb.blogspot.com/2009/01/apex-report-with-checkboxes-advanced.html] explains one way to do that which should work for you. I haven't tried, it, but it looks pretty comprehensive.
    Good luck,
    Stew

  • Changeing the rows into columns..

    Hello Experts,
    I have a one requirement which is display rows as columns
    for Example:
    material
    plant
    quantity
    amount
    1000
    100
    30
    60
    200
    50
    100
    300
    60
    120
    2000
    200
    50
    100
    300
    60
    120
    400
    32
    64
    3000
    100
    40
    80
    400
    20
    40
    I need output like this below..
    material
    100
    200
    300
    400
    1000
    30
    50
    60
    90
    100
    120
    2000
    50
    60
    32
    100
    120
    64
    3000
    40
    20
    80
    40
    I created the ALV table dynamically using at end of event..
    but I am getting the
    material
    100
    200
    300
    400
    1000
    30
    50
    60
    90
    100
    120
    2000
    60
    32
    120
    64
    3000
    20
    40
    the values are missing ..?
    I wrote like this:
    LOOP AT lt_final INTO ls_final.
        ASSIGN COMPONENT 'matnr' OF STRUCTURE <dyn_wa> TO <fs1>.
         <fs1> = ls_final-matnr.
         ASSIGN COMPONENT ls_final-vkorg OF STRUCTURE <dyn_wa> TO <fs1>.
         <fs1> = ls_final-qunaty.
         ASSIGN COMPONENT ls_final-vkorg OF STRUCTURE <dyn_wa> TO <fs1>.
         <fs1> = ls_final-amount.
         AT END OF matnr.
           APPEND <dyn_wa> TO <dyn_table>.
           CLEAR : <dyn_wa>.
         ENDAT.
       ENDLOOP.

    I have written a snippet whose output is:
    Take a look at the snippet.
    TYPES:
    BEGIN OF ty,
      a1 TYPE char10,
      a2 TYPE char10,
      a3 TYPE char10,
      a4 TYPE char10,
    END OF ty,
    BEGIN OF ty2,
      a1  TYPE char10,
      100 TYPE char10,
      200 TYPE char10,
      300 TYPE char10,
      400 TYPE char10,
      no  TYPE char10,
    END OF ty2.
    DATA: lt TYPE TABLE OF ty,
          ls TYPE ty,
          lt2 TYPE TABLE OF ty2,
          ls2 TYPE ty2,
          lr TYPE REF TO cl_salv_table.
    FIELD-SYMBOLS: <lv>   TYPE char10,
                   <ls2>  TYPE ty2.
    *material   plant   quantity  amount
    ls-a1 = 1000.
    ls-a2 = 100. ls-a3 = 30. ls-a4 = 60.  APPEND ls TO lt.
    ls-a2 = 200. ls-a3 = 50. ls-a4 = 100. APPEND ls TO lt.
    ls-a2 = 300. ls-a3 = 60. ls-a4 = 120. APPEND ls TO lt.
    ls-a1 = 2000.
    ls-a2 = 200. ls-a3 = 50. ls-a4 = 100. APPEND ls TO lt.
    ls-a2 = 300. ls-a3 = 60. ls-a4 = 120. APPEND ls TO lt.
    ls-a2 = 400. ls-a3 = 32. ls-a4 = 64.  APPEND ls TO lt.
    ls-a1 = 3000.
    ls-a2 = 100. ls-a3 = 40. ls-a4 = 80.  APPEND ls TO lt.
    ls-a2 = 400. ls-a3 = 20. ls-a4 = 40.  APPEND ls TO lt.
    TRY.
        LOOP AT lt INTO ls.
    *     index 1 for filling quantity in a3 field
          READ TABLE lt2 ASSIGNING <ls2>
              WITH KEY  a1 = ls-a1
                        no = 1.
          IF sy-subrc NE 0.
            APPEND INITIAL LINE TO lt2 ASSIGNING <ls2>.
            <ls2>-a1 = ls-a1. <ls2>-no = 1.
          ENDIF.
          ASSIGN COMPONENT ls-a2 OF STRUCTURE <ls2> TO <lv>.
          <lv> = ls-a3.
    *     index 2 for filling quantity in a4 field
          READ TABLE lt2 ASSIGNING <ls2>
              WITH KEY  a1 = ls-a1
                        no = 2.
          IF sy-subrc NE 0.
            APPEND INITIAL LINE TO lt2 ASSIGNING <ls2>.
            <ls2>-a1 = ls-a1. <ls2>-no = 2.
          ENDIF.
          ASSIGN COMPONENT ls-a2 OF STRUCTURE <ls2> TO <lv>.
          <lv> = ls-a4.
        ENDLOOP.
        cl_salv_table=>factory(
          IMPORTING
            r_salv_table   = lr
          CHANGING
            t_table        = lt2
        lr->display( ).
      CATCH cx_root.
    ENDTRY.

  • Where is the "reference tab's pop-up menu" in this instruction, "To hide a single row or column, choose Hide Row or Hide Column from the row or column reference tab's pop-up menu."

    Where is ref tab's pop-up menu?

    I made this screenshot to show convert to header row which is done from the same pop-up menu. Hover your cursor between the row number & the first cell until you see the triangle then click the triangle.

  • Changing the text and the order of columns in ALV for WebDynpro

    Hello experts, im using ALV in WebDynpro, and i have this code:
    lr_column   = lo_value->if_salv_wd_column_settings~get_column( 'ZNC_MONTO_LIQ' ).
    lr_column_header = lr_column->get_header( )
    lr_column_header->set_text( 'IMPORTE' ).
    but this code, doesn't change the title of the column.
    the same happens when i put the visibility in "none" or when i change the position of the column
    Anyone can tell why this is happening?
    Thanks!

    You can't set the text of the generated header directly.  You have to first delete the standard header and create a new one.  You can then override the header text.
    l_column = l_table->if_salv_wd_column_settings~get_column( 'CREATED_AT' ).
      l_column->delete_header( ).
      l_header = l_column->create_header( ).
      l_header->set_text( `Created At` ).

  • The tool bar that has edit, delete view tools etc. and the row below it that had the refresh key have disappeared, how do I get them back?

    About 2 weeks ago the tool bar at the top of the page when i log on vanished. Its the toolbar that has copy, edit, view, tools, etc. A week later the next line vanished that has the refresh key and a search line. Now I can't clear cookies, caches, history etc. Please help me restore these bars/lines.

    I had this problem too, but someone suggested pressing the F10 key to restore the menu bar. In that under View, there is a place to pick the menu bar and features you want. It worked in my case.

  • Row selector select all default in Tabular Form

    Hi,
    I am a newbie to APEX using 4.0. I have a tabular form with the default "row selector". Our requirement is to have the checkbox in the row selector column automatically checked when the tabular form is rendered, so that they can uncheck the lines that they do not want to select. The tabular form will have many records displayed on multiple pages. How can I select all in the row selector when the page is rendered?
    Thanks a lot for you help.
    Ed

    Ed,
    Create an on load dynamic action that executes the following javascript code:
    var elm = $x('check-all-rows');
    elm.checked = true;
    checkAll(elm);Cheers,
    Tyson Jouglet
    Edited by: Tyson Jouglet on Jun 24, 2011 7:00 AM

Maybe you are looking for