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

Similar Messages

  • Select List in a Tabular Form

    Hello all,
    Using APEX 4.1 on Oracle 11.2 SE (Oracle Linux Server release 6).
    I have a Page with a region based on a Tabular Form.
    The Region Source query has various columns, including an ID. I have also added a DATE column and a "Button" column which appear on every row.
    The extra DATE field is displayed as a Select List on a Named LOV.
    The extra Button field is displayed as a standard report column, and has Column Link attributes which cause it to branch to another page when pressed.
    What I want to happen is that when the user presses the button on one of the rows, APEX sets two application items before going to the new page:
    1. the ID column for the row in which the button was pressed
    2. the value currently highlighted in the Select List, for the row in which the button was pressed
    Using a Column Link item value of #ID# I can successfully get hold of the ID column for the correct row.
    But doing the same for the Select List column invariably returns the default value of the Select List (i.e. the initially-selected value). It doesn't pick up the change if the user has gone into the Select List and chosen a different value.
    Can anybody advise the easiest way to acquire the selected value in a Select List in a Tabular Form?

    Thanks for the reply!
    To get this working I did the following:
    1. Used APEX_ITEM.SELECT_LIST_FROM_LOV(... p_item_id=>'LOVI_'||TO_CHAR(id) ...) in the base query, to generate the LOV. (Note: the ID column is the primary key, so no need to use a ROWNUM column)
    2. Added a Standard Report Column with the following settings:
    Link Text = <img ... >
    Link Attributes = Empty
    Target = URL
    URL = javascript:window.location.href = 'f?p=&APP_ID.:123:&SESSION.::::ID,SELECTED_STRING:#ID#,'+$v('LOVI_'+'#ID#');
    So when the link is pressed, the JavaScript is invoked and it evaluates to the value currently present in the uniquely-named <select> item.
    Ian

  • Select item on a Tabular form with a different dynamic LOV on each row

    I would like to use a tabular form where one of the columns is a dynamic LOV based Select, and where that dynamic LOV refers to one of the column values on each row.
    So if the tabular form represented a list of teams and the LOV-based Select column was the current team leader, I would want that select list to be populated only with the members of that team (different for each row). Since the list of team members is in some other table (all_players or something) I would want to populate the LOV with a query with a where clause that selected only those players records with a team-membership equal to the current tabular form's team id. So, on each row that select list's contents would be different.
    -- Justin

    I'm beating a dead horse here but I did get something to work with "less" code. My current needs do not require me to cascade drop downs, I only want 1. You can use the query like the in the first reply (but I don't have a table with joins) I created a simple two column table dept_emp with 4 records 10,null 20,null .... I want to fill the nulls with an employee but ONLY an employee that matches the dept. (Same concept of team leader and members).
    Here's the query:
    select apex_item.display_and_save(1,dept) dept,
    apex_item.select_list_from_query(2, name, 'select ename from emp where deptno='||dept) name
    from dept_emp
    I removed the code that was there already (ApplyMRU) and just put in this code:
    BEGIN
    FOR i IN 1..HTMLDB_APPLICATION.G_F01.COUNT LOOP
    UPDATE dept_emp
    SET
    name=HTMLDB_APPLICATION.G_F02(i)
    WHERE dept=to_number(HTMLDB_APPLICATION.G_F01(i));
    END LOOP;
    END;
    The G_F01 matches the column 1 and so forth. There's more documentation but little explanation at:
    http://download.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/api.htm#sthref2171
    The thing I could not get to work was a dynamic message
    #MRU_COUNT# row(s) updated, #MRI_COUNT# row(s) inserted.
    Not sure when the MRU_COUNT gets populated (probably in the routine I removed ;))
    You're probably way past me by now but I like to have as little code as possible when it comes to maintaining an app. That's why I liked oracle forms so much. This kind of stuff was pretty easy to do.
    Thanks again everybody!

  • Select List in Manual Tabular Form based on a previous column

    I have a manual tabular form that have several columns One column (vendor) is a select list that should be based on a previous column (Vendor Type - Internal/External). So if the user selects Internal for Vendor Type, the Vendor column's select list should only contain those vendors with type of Internal. By the way, it also uses APEX collections.
    select
      apex_item.hidden                   (1,C015) STATUS,
      apex_item.checkbox                 (2,SEQ_ID,'title="check to delete"') CHECKBOX,
      case
        when (c001 is not null and c002 is not null) then
          '<a onclick="return false;" href="f?p='||:APP_ID||':20:'||:APP_SESSION||'::NO:20:P20_ID,P20_REQ_ID,P20_SEQ_ID:'||C001||','||C002||','||SEQ_ID||'"><img alt="" src="/i/ed-item.gif"></a>'
      end ||
      apex_item.hidden                   (4,C001) ID,
      apex_item.hidden                   (5,C002) JOB_QUOTE_ID,
      apex_item.date_popup2              (6,C003,'MM/DD/YYYY',11,2000,'onChange="f_set_end_date(this.id,'|| ROWNUM || ');"') ||
      apex_item.select_list_from_query   (7,C004,'select svcs_description d, svcs_code r from csrsr_service_codes order by 1 asc',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.date_popup2              (8,C005,'MM/DD/YYYY',11) ||
      apex_item.text                     (9,C006,8,15,'style="text-align:right;"') || '<BR />' ||
      apex_item.select_list              (10,C007,'Staff;S,External;E',null,'YES',null,'-Select-') ||
      apex_item.select_list_from_query_xl(11,C008,'select vendor_name d, vendor_number r from csrsr_vendors_v',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.text                     (12,C009,50,100,'colspan=2') COL12,
      apex_item.text                     (13,to_char(to_number(C010),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT1,
      apex_item.text                     (14,to_char(to_number(C011),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT2,
      apex_item.text                     (15,to_char(to_number(C012),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT3,
      apex_item.text                     (16,to_char(to_number(C013),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT4,
      apex_item.hidden                   (24,C001) ||
      apex_item.hidden                   (25,C002) ||
      apex_item.hidden                   (3,SEQ_ID) ||
      apex_item.text                     (17,to_char(to_number(C014),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') CHBK_AMT,
      'value' COLTYPE
    from
      apex_collections
    where
      collection_name = 'CSRSR_JOBCOSTS_C' and
      C015 in ('O','U','N')
    union all
    select
      apex_item.hidden                   (1,null) STATUS,
      apex_item.checkbox                 (2,null,'title="check to delete"') CHECKBOX,
      apex_item.hidden                   (24,null) ||
      apex_item.hidden                   (4,null) ID,
      apex_item.hidden                   (25,null) ||
      apex_item.hidden                   (5,null) JOB_QUOTE_ID,
      apex_item.date_popup2              (6,null,'MM/DD/YYYY',11,2000,'onChange="f_set_end_date(this.id,'|| ROWNUM || ');"') ||
      apex_item.select_list_from_query   (7,null,'select svcs_description d, svcs_code r from csrsr_service_codes order by 1 asc',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.date_popup2              (8,null,'MM/DD/YYYY',11) ||
      apex_item.text                     (9,null,8,15,'style="text-align:right;"') || '<BR />' ||
      apex_item.select_list              (10,null,'Staff;S,External;E',null,'YES',null,'-Select-') ||
      apex_item.select_list_from_query_xl(11,null,'select vendor_name d, vendor_number r from csrsr_vendors_v',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.text                     (12,null,50,100,'colspan=2')  COL12,
      apex_item.text                     (13,null,10,15,'style="text-align:right;"') AMT1,
      apex_item.text                     (14,null,10,15,'style="text-align:right;"') AMT2,
      apex_item.text                     (15,null,10,15,'style="text-align:right;"') AMT3,
      apex_item.text                     (16,null,10,15,'style="text-align:right;"') AMT4,
      apex_item.hidden                   (24,null) ||
      apex_item.hidden                   (25,null) ||
      apex_item.hidden                   (3,null) ||
      apex_item.text                     (17,null,10,15,'style="text-align:right;"') CHBK_AMT,
      'value' COLTYPE
    from
      dual
    How can I accomplish this?
    Application Express 4.1.2    
    Oracle 10g Rel 2
    Robert

    Hi,
    Then you are probably looking cascading select list in tabular form?
    http://dbswh.webhop.net/htmldb/f?p=BLOG:READ:0::::ARTICLE:2003800346210117
    Regards,
    Jari

  • Cascading select list in a tabular form -plz help me out

    hello,
    how can i implement cascading select list for filtering my tabular form report results.
    Like i want to have the cascading select list's above the tabualr form report such that when i select the value in one select list, this should populate the values in other select list box(like one select list is dependent on other select list) and try to click a button say refresh, my tabular form report should be refreshed and should filter the report based on the select list value.
    i want to have three select list items above my report - and these select list are dependent on one other - tats why i want to make them cascading select list.
    can anyone provide me with an example of the cascading select list.
    can anyone help me out with cascading select list.
    thanks.

    Aplication item is always hidden - Shared Components > Application Items. You can create only one item and that would also be enough. For transparency purposes I said to create two. However, one will do the job.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Highlight table control rows when select all button is clicked

    Hi Experts,
    I have a table control and filling up rows through user input and i have also created button such as Select All* , De-Select All, and Delete.
    Now the issue is when i am pressing the select all button all the rows are marked for deletion(internal 'X' flag is set) but the rows are not highlighted(so that user will be able to know that all rows are selected).
    Anything that i am missing, please guide......
    Regards,
    Abhijit G. Borkar

    Ohh sorry there was some problem with the internet connect, that's why  this duplicate happened.
    Regards,
    Abhijit G. Borkar

  • Default on tabular form item

    Hi,
    I saw that you can choose the default types:
    - no default
    - item (application or page item name)
    - PL/SQL Expression or function
    The next field is the default value I assume. I selected item and referred to an item on the same page with :P27_ITEM_NAME or &P27_ITEM_NAME.
    Both do not work, can you help me with this, since I probably have the syntax wrong then.
    My goal is to have a default value already displayed when I press add row.
    Thanks,
    Patrick

    Hi,
    I tried the same. My page item stored a number so I chose "PL/SQL Expression or Function" for default type.
    And in the default field I entered: to_number(:P9018_model_id)
    Regards,
    Denise

  • How to add a new row at the top of manual tabular form

    I have a manual tablular form. I'm trying to add a row at the top of the form, instead of new row of being displayed at the bottom. any ideas are appreciated.
    thanks,
    Surya

    This will depend on two things:
    1. sorting of the columns - needs to be a some kind of a descending sorting on a hidden column, enabled within the Report Attributes and not in the SQL Query
    2. Report Attributes => Layout and Pagination => Sort Nulls First
    You will need to play with those settings a bit. One thing to consider is that you should sort your report on a hidden column and you shuldn't enable the sorting on visible columns, because it will mess up your row positioning.
    See this example:
    http://apex.oracle.com/pls/otn/f?p=31517:215
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Select all instances of cells form a dynamic table

    HI,
    I've an issue with a table.
    I've found some answers here : http://forums.adobe.com/thread/849841 but don't work.
    Let me explain.
    I've got a dynamic table (with addInstance button and remove one).
    There is 4 columns: 2 open and 2 readOnly.
    Some users are allowed to change the readOnly ones.
    Then, I've created a password field.
    with :
    if (formulaire1.titre.pw.pass.rawValue == "123")
    and here... I'm bloqued
    I've tried :
    for (i=0;i<=formulaire1.check.tab1.r1.instanceManager.count;i++){
         xfa.resolveNode{"formulaire1.check.tab1.r1.[" + i + "].materiel").access = "open" ;
    but failed (notting happend)
    I've tried :
    xfa.formulaire1.check.tab1.r1.resolveNodes("materiel[*]").access = "open";
    failled, too
    I've tried just : formulaire1.check.tab1.r1.materiel.access = "open";
    Just open the first instance...
    I'm not developper just designer... And here, I'm lost.
    Thanks to help me.
    Nath_lost

    Hi,
    The finished version of the SOM Expression example is here: http://assure.ly/kUP02y.
    Try this in the exit event of the pass object:
    var nMateriel = xfa.resolveNodes("formulaire1.check.tab1.r1[*].materiel");
    var nFinishes = xfa.resolveNodes("formulaire1.check.tab1.r1[*].finishes");
    if (this.rawValue == "123") {
         for (var i=0; i<nMateriel.length; i++) {
              nMateriel.item(i).access = "open";
              nFinishes.item(i).access = "open";
    else  {
         for (var i=0; i<nMateriel.length; i++) {
              nMateriel.item(i).access = "readOnly";
              nFinishes.item(i).access = "readOnly";
    This covers the material object and a fictional "finishes" to represent the second object that you want to set to open.
    Also in your for script you were using an "i" variable, but you did not declare it, eg "var i=0". This is a hit on performance.
    Hope that helps,
    Niall
    Message was edited by: Niall O'Donovan: there was an extra . in the xfa.resolveNodes. r1.[*] should have read r1[*].

  • A default value in tabular form

    Hi all,
    I have a simple tabular form, and i'd like that if a certain field doesn't contain any value to fill it with a default value.
    I tried to do it via default value attribute, but i'd like it to take place in a certain record in the table and not in all the records (which i can identify by a key, e.g. id)
    how would you do it????
    Liron

    Hello Liron,
    >> when i submit the page, it doesn't take the default value (which indeed appear on screen) but null
    Well, if this default value is the only “change” in this row, it will not be updated into the table, because the tabular form mechanism is not detecting any changes in this row – remember, as far as the tabular form goes, this is the original value of the cell.
    However, it seems like you want this default value to be saved, regardless of other possible activities of the tabular form. In this case, you should run the update prior to rendering the tabular form. You can use a before header PL/SQL block to do that. Using the EMP example, you can use a similar code in your pl/sql block:
    update emp
    set comm = 10
    where comm is null and deptno=20This pl/sql block will run prior to your tabular form query, and all the updates will be reflected in the rendered result. Now you can continue to work with the tabular form to enter the rest of the changes you need (including deleting the new default values).
    Don’t forget to change the tabular form query back to its original form. If you are using this technique, you don’t need the CASE statement.
    Regards,
    Arie.

  • Issue with my Tabular form Cascading Select List

    Hello Friends,
    I have implemented a Cascading select list in a tabular form with the below SQL ...
    SELECT apex_item.hidden(31,line_no)
      || apex_item.select_list_from_query(32, POLE_CODE_ID, 'select POLE,POLE_ID from CAP_PLAN_POLE_DETAILS', 'style="" '
      || 'onchange="f_set_casc_sel_list_item(this,'
      || 'f33_'
      || LPAD (line_no, 4, '0')
      || ')"', 'YES', '0', '- Select Pole -', 'f32_'
      || LPAD (line_no, 4, '0'), NULL, 'NO' ) POLE_CODE_ID,
      apex_item.select_list_from_query(33, COUNTRY_CODE_ID, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS', 'style=""', 'YES', '0', '- Select Country -', 'f33_'
      || LPAD (line_no, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,
      apex_item.text(34,LEGAL_ENTITY) LEGAL_ENTITY,
      apex_item.text(35,BUSINESS) BUSINESS,
      apex_item.text(36,COUNT_OF_NAMED_USERS,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_NAMED_USERS,
      apex_item.text(37,COUNT_OF_CONCURRENT_USERS,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_CONCURRENT_USERS,
      apex_item.text(38,INVENTORY_ORG) INVENTORY_ORG
    FROM cp_sites_details
    WHERE cap_plan_id = nv('P94_CP_ID')
    UNION ALL
    SELECT apex_item.hidden(31,NULL)
      || apex_item.select_list_from_query(32, 0, 'select POLE,POLE_ID from CAP_PLAN_POLE_DETAILS', 'style="" '
      || 'onchange="f_set_casc_sel_list_item(this,'
      || 'f33_'
      || LPAD (9900 + LEVEL, 4, '0')
      || ')"', 'YES', '0', '- Select Pole -', 'f32_'
      || LPAD (9900 + LEVEL, 4, '0'), NULL, 'NO' ) POLE_CODE_ID,
      apex_item.select_list_from_query(33, NULL, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS WHERE POLE_ID=0', 'style=""', 'YES', '0', '-
    SELECT Country                                                                                                                                                                                                                                                                             -', 'f33_'
      || LPAD (9900 + LEVEL, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,
      apex_item.text(34,NULL) LEGAL_ENTITY,
      apex_item.text(35,NULL) BUSINESS,
      apex_item.text(36,NULL,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_NAMED_USERS,
      apex_item.text(37,NULL,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_CONCURRENT_USERS,
      apex_item.text(38,NULL) INVENTORY_ORG
    FROM dual
    WHERE :REQUEST='ADDSITES'
      CONNECT BY LEVEL = 2The filters to list the countries[2nd col of SQL, field : f33] will work on Change of Pole after a selection is made..the whole list of countries will appear with out the Pole being considered. I understand that is the case because, I have not used PoleID in the query for f33
    SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS'Now, how can I fix this to use the Pole Id every time the country Select List is touched..Can I just modify the query or should I add a Java Script OnChange function to handle this...
    Please please help..
    Thanks for reading the question...

    Isn't this given in my example:
    http://apex.oracle.com/pls/otn/f?p=31517:176
    The second list is extended by adding:
    || 'WHERE deptno = '
    || c001to make sure it renders correctly once you call your report. In your case the second list would be extended by adding the following
    apex_item.select_list_from_query(33, COUNTRY_CODE_ID, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS ' || 'WHERE  POLE_ID = ' || POLE_CODE_ID
    , 'style=""', 'YES', '0', '- Select Country -', 'f33_'
      || LPAD (line_no, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,and that should work.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Tabular Form - new row at top not working

    I'm trying to add a new row to the top of a tabular form (not manual) vs the bottom using Denes example - http://apex.oracle.com/pls/otn/f?p=31517:215 but it's not working. I absolutely need the records to sort on the date and time, but when I add a hidden column and sort it in descending order, then sort the date and time both in descending order, it doesn't sort correctly. I tried using the primary key field of the table as the hidden column, sorting nulls first, but the new record opens at the bottom (If I have "sorting nulls first" selected and at the time a new row is added the primary key field is null, why doesn't the new row open at the top?). I added a new field (date field with timestamp) to the query, then deselected "show" in the column attributes...that didn't work. I then selected "show", and changed the tabular form element display as to "Hidden", but then I got an error when I clicked "Add New", and I also added a column to my query via apex_item.hidden but no luck there either. What's the best way to go about this, but still maintain the date and time sort?
    Thank you,
    Tammy

    We did that. It didn't resolve it...
    Also, I compared the images directory from the complete apex 4.1.1. installation and compared it to patch 13331096 (latest 4.1.1 patch). They are identical.
    Any other ideas I can try out?

  • How to find the row being deleted in a Tabular Form?

    version 3.2.1
    How do I find out what row is being deleted in a Tabular Form (SQL Query (updateable report) )?
    I have a process to delete records from another table when the record in the report is deleted. I need to capture the primary key to pass to the process that deletes the record from the other table.
    Thanks,
    Joe

    Hm,
    The best thing is to do this using triggers before delete. Looping through the list of checked checkboxes is not an optimal solution. If the standard MRD process fails for whatever reason, your delete process for the rows in the other table will still delte the records with the selected primary key.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Cascading select list (query based) in a tabular form

    Hi,
    In my application i have two select list in a tabular form one for selecting manager_id and other for selecting employees for the selected manager_id how can i do it in apex 4.0
    thanks in advance

    Ok i will assume that you have 2 select list items called (P1_MANAGER AND P1_EMPLOYEE)
    In employee select list u need to find Cascading LOV Parent Item(s) and set it to P1_MANAGER. Ofc your sql query must be smth like this:
    SELECT employee_name d, employee_id r FROM employee_table WHERE employee_manager = :P1_MANAGER

  • Add row in tabular form fails, "gErrItems is undefined"

    I'm struggling to get Apex working on my new laptop.
    Apex 4.1.1, Oracle 10.2.0.5, Windows 7 64 bit.
    I click 'Add row' on the detail region (the tabular form) on my Master - Detail page.
    The row appears, but after clicking 'Apply changes' it's gone again.
    Using Firebug, I see that the javascript causes an "gErrItems is undefined" error, something coming from apex_4_1.min.js
    The same application works fine on apex.oracle.com, so it's the installation on my laptop.

    It seems to be a problem with apex_listener under Glassfish.
    I'll post in the proper forum again.

Maybe you are looking for

  • /etc/profile isn't sourced on startx

    the command source /etc/profile isn't used on startx and now all paths and locales aren't set, has anyone an idea whats wrong here? if i login on console it behaves normal. But if i login on X with qingy or slim it doesn't work. It also doesn't work

  • I need help on This SQL problem ASAP :)

    Hi All, I need help on this.... I have a table... Say table name: one with these values premnum status 1234 C 1234 F 1234 P 1234 F 5678 C 5678 F 5678 P 9112 C 9112 F 9112 P 9112 F 3456 C 3456 F 3456 P 7890 C 7890 P 7890 F Now, I want to output only t

  • ON BUTTON.....

    Hi, my MacBook, it's "ON" button it isnot doing anything at all at all, can you please if you can help me with perhaps solutions, I thank you much Beijos, Isabella

  • Pls i need a mentor

    i just started with oracle forms and i am getting all kinds of error messages, as you can imagine. i know i can give up but if io don't have any one to assist me it going to be war for me. my e-mail address is [email protected]

  • Blocky Blues via Black Point? HELP!

    Hi. I am working through a wedding shoot, and there is one particular shot where if I boost the Black Point anything higher than 2, the shadows in one guest's suit go from I'd say 80% blue to blocky, blotchy black in a matter of like 0.1 units of Bla