Re-enable column values in tabular form before submit

Hi,
I am using Apex 4.1. I have a tabular form. I created a dynamic action to disable some of the columns on page load.
It works fine and I am able to add new rows. But when I click submit, all the column values are null and it is throwing validation error.
I need to enable all the columns before submit. I invoked a javascript to enable all the fields, but still i get the validation error.
I also tried creating dynamic action to enable the values but still I get the validation error becuase the values are all null.
Please help me to resolve this issue.
Thanks
SR

Per HTML standards, disabled items are not submitted. Therefore if they are disabled at the point of submit, their corresponding session state values will be null (as you discovered). Apex validates against what is is session state, not against what is on your screen, so since the values didn't get submitted (per standards for HTML disabled items) that's why Apex thinks they are null.
Before submit, re-enable the items/columns and it should work fine.
Edit: Sorry, looks like you are doing this already. But are you doing it in the right order?
How I have done it is:
1. Change the save/apply changes button (whatever is doing the submit) to call a URL.
2. Make the URL call javascript, such as:
javascript:formSave('SAVE');
3. Put a javascript function on your region or page (hypothetical example):
<script type="text/javascript">
function formSave(pRequest)
{ //Put all checking and processing prior to form save here.
  var vRequest="SAVE"; //default value taken from orig. "apply changes" button
  if(pRequest)
    vRequest=pRequest;
  enableAllCells(gMaintActionCol); //Put whatever code you have to re-enable your tabular form items here, must fire before apex.submit.
  //Do the save
  apex.submit(vRequest);
</script>Edited by: gti_matt on Dec 1, 2011 3:04 PM

Similar Messages

  • How to restrict user to not enter same value in tabular form

    Greetings !
    i m asking second time the questiion because i was not answered preivously, so please dont mind if it is a duplicate one,
    question was: i created tabular form as shown in example.
    i want to validate username as you see in my example to restrict user to enter the same value in username field before submit page.
    e.g when user is entering data as u see test in username in first row, when he/she goes to second row and type the same username like test " message will appear or restrict user that already typed or in use"..
    http://apex.oracle.com/pls/apex/f?p=45296:1:22797340776918:::::
    this all be done on typing before submit record.
    please gudie

    Hi,
    i m asking second time the questiion because i was not answered preivously, so please dont mind if it is a duplicate one,question was: i created tabular form as shown in example.
    i want to validate username as you see in my example to restrict user to enter the same value in username field before submit page.
    e.g when user is entering data as u see test in username in first row, when he/she goes to second row and type the same username like test " message will appear or restrict user that already typed or in use"..
    http://apex.oracle.com/pls/apex/f?p=45296:1:22797340776918:::::
    this all be done on typing before submit record.>
    Stick the below code in the Page Header > Javascript > Execute when Page Loads field.
    $('[input[name="f03"]').blur(function(){
      if ($('input[name="f03"][id!="'+$(this).attr('id')+'"]').val() == $(this).val()) {
         alert('Duplicate Entry.');
         var x = $(this).attr('id');
         setTimeout("(function(p){$('#'+p).focus();})('"+x+"')",100);
    })Note :
    a.f03 is the "name" of your username column in the Tabular form.
    b. This validates only the displayed values . If your Tabular Form has multiple pages then all the rows not currently displayed will be ignored.
    Cheers,

  • How to make a column in a tabular form required?

    How to make a column in a tabular form required ?

    the column name is test_id , and the debug report is :
    0.00000
    0.00000
    ...NLS: Set Decimal separator="."
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.00000
    Metadata: Fetch application definition and shortcuts
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.00000
    NLS: wwv_flow.g_flow_language_derived_from=FLOW_PRIMARY_LANGUAGE: wwv_flow.g_browser_language=ar-eg
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.00000
    alter session set nls_language="EGYPTIAN"
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.00000
    alter session set nls_territory="EGYPT"
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.00000
    NLS: CSV charset=AR8MSWIN1256
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.01500
    A C C E P T: Request="CREATE"
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.00000
    ...NLS: Set NLS Group separator=","
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.00000
    ...NLS: Set g_nls_date_format="DD/MM/RR"
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.00000
    ...NLS: Set g_nls_timestamp_format="DD/MM/RR HH12:MI:SSXFF PM"
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.00000
    ...NLS: Set g_nls_timestamp_tz_format="DD/MM/RR HH12:MI:SSXFF PM TZR"
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.00000
    ...Setting session time_zone to +02:00
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.00000
    0.00000
    ...metadata, fetch translated app info
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...fetch session state from database
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    fetch items
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...fetched 14 session state items
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Check session 8341322256175063 owner
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Check for session expiration:
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Metadata: Fetch Page, Computation, Process, and Branch
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    Session: Fetch session header information
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...metadata, fetch page info
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Validate item page affinity.
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Validate hidden_protected items.
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Check authorization security schemes
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Initialize tabular form column mapping
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    Session State: Save form items and p_arg_values
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Session State: Save "P38_CLIENT_ID" - saving same value: ""
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Session State: Saved Item "P38_CLIENT_NAME" New Value="asdf"
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Session State: Saved Item "P38_AGE" New Value="23"
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Session State: Saved Item "P38_SEX" New Value="ذكر"
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Session State: Saved Item "P38_PHONE" New Value="23"
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Session State: Save "P38_EMAIL" - saving same value: ""
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Session State: Saved Item "P38_DOC_NAME" New Value="adsf"
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Session State: Save "P38_NOTES" - saving same value: ""
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Session State: Save "P38_CLIENT_ID_NEXT" - saving same value: ""
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Session State: Save "P38_CLIENT_ID_PREV" - saving same value: ""
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Session State: Save "P38_CLIENT_ID_COUNT" - saving same value: ""
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    Processing point: On Submit Before Computation
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    Branch point: Before Computation
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    Computation point: After Submit
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    Tabs: Perform Branching for Tab Requests
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    Branch point: Before Validation
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    Validations:
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    Perform basic and predefined validations:
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Validate is not null for P38_CLIENT_NAME
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.00000
    ...Validate is not null for P38_AGE
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.01500
    0.01600
    ...Validate is not null for P38_PHONE
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.03100
    0.00000
    ...Validate is not null for P38_DOC_NAME
    4
    http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2http://127.0.0.1:8080/apex/f?p=4000:939:8341322256175063::NO:939:P939_PAGE_VIEW_ID:2
    0.03100
    0.00000
    Perform custom validations:

  • How to use Ajax Get Multiple Values in Tabular form?

    Hi All-
    I am trying to use AJAX to get multiple values in tabular form by using Denes Kubicek's example in the following link -
    http://apex.oracle.com/pls/otn/f?p=31517:239:9172467565606::NO:::
    Basically, I want to use the drop down list to populate rest of the values on the form.
    I have created the example(Ajax Get Multiple Values, application 54522) on Oracle site -
    http://apex.oracle.com/pls/apex/f?p=4550:1:0:::::
    Workspace: iConnect
    login: demo
    password: demo
    I was able to duplicate his example on page 1 (home page).
    However, I want to use system generate tabular form to finish this example, and was not able to populate the data correctly.
    Page 2 (method 2) is the one that I am having trouble to populate the column values. When I checked application item values in Session, and the values seems to be populated correctly.
    This is what I have done on this page:
    1. Create an Application Process On Demand - Set_Multi_Items_Tabular2:
    DECLARE
      v_subject my_book_store.subject%TYPE;
      v_price my_book_store.price%TYPE;
      v_author my_book_store.author%TYPE;
      v_qty NUMBER;
      CURSOR cur_c
      IS
      SELECT subject, price, author, 1 qty
      FROM my_book_store
      WHERE book_id = :temporary_application_item2;
    BEGIN
      FOR c IN cur_c
      LOOP
      v_subject := c.subject;
      v_price := c.price;
      v_author := c.author;
      v_qty := c.qty;
      END LOOP;
      OWA_UTIL.mime_header ('text/xml', FALSE);
      HTP.p ('Cache-Control: no-cache');
      HTP.p ('Pragma: no-cache');
      OWA_UTIL.http_header_close;
      HTP.prn ('<body>');
      HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
      HTP.prn ('<item id="f04_' || :t_rownum || '">' || v_subject || '</item>');
      HTP.prn ('<item id="f05_' || :t_rownum || '">' || v_price || '</item>');
      HTP.prn ('<item id="f06_' || :t_rownum || '">' || v_author || '</item>');
      HTP.prn ('<item id="f07_' || :t_rownum || '">' || v_qty || '</item>');
      HTP.prn ('</body>');
    END;
    2. Create two application items - TEMPORARY_APPLICATION_ITEM2, T_ROWNUM2
    3. Put the following in the Page Header:
    <script language="JavaScript" type="text/javascript">
    function f_set_multi_items_tabular2(pValue, pRow){
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Set_Multi_Items_Tabular2',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM2',pValue)
    get.add('T_ROWNUM2',pRow)
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM2','null')
        gReturn = get.get('XML');
        if(gReturn){
            var l_Count = gReturn.getElementsByTagName("item").length;
            for(var i = 0;i<l_Count;i++){
                var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
                var l_ID = l_Opt_Xml.getAttribute('id');
                var l_El = html_GetElement(l_ID);   
                if(l_Opt_Xml.firstChild){
                    var l_Value = l_Opt_Xml.firstChild.nodeValue;
                }else{
                    var l_Value = '';
                if(l_El){
                    if(l_El.tagName == 'INPUT'){
                        l_El.value = l_Value;
                    }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
                        l_El.parentNode.innerHTML = l_Value;
                        l_El.parentNode.id = l_ID;
                    }else{
                        l_El.innerHTML = l_Value;
        get = null;
    </script>
    Add the follwing to the end of the above JavaScript:
    <script language="JavaScript" type="text/javascript">
    function setLOV(filter, list2)
    var s = filter.id;
    var item = s.substring(3,8);
    var field2 = list2 + item;
    f_set_multi_items_tabular2(filter, field2);
    4. Tabular form query:
    select
    "BOOK_ID",
    "BOOK",
    "SUBJECT",
    "PRICE",
    "AUTHOR",
    "QTY",
    "BOOK_ID" BOOK_ID_DISPLAY
    from "#OWNER#"."MY_BOOK_STORE"
    5. In Book_ID_DISPLAY column attribute:
    Add the following code to element attributes: onchange="javascript:f_set_multi_items_tabular2(this.value,'#ROWNUM#');"
    Changed to -> onchange="javascript:setLOV(this,'f03');"
    Now,  T_ROWNUM2 returns value as f03_0001. But, TEMPORARY_APPLICATION_ITEM2 returns as [object HTMLSelectElement]...
    Please help me to see how I can populate the data with this tabular form format. Thanks a lot in advanced!!!
    Ling
    Updated code in Red..

    Ling
    Lets start with looking at what the javascript code is doing.
    function f_set_multi_items_tabular(pValue, pRow){
      /*This will initiate the url for the demand process to run*/
      var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
                              'APPLICATION_PROCESS=Set_Multi_Items_Tabular',0);
      if(pValue){
        /*If there is an value than submit item name with value*/
        get.add('TEMPORARY_APPLICATION_ITEM',pValue)
        get.add('T_ROWNUM',pRow)
      }else{
        /*Else set the item TEMPORARY_APPLICATION_ITEM to null*/
        get.add('TEMPORARY_APPLICATION_ITEM','null')
      /*Submit the url and te returned document is of type XML*/
      gReturn = get.get('XML');
      if(gReturn){
        /*There is something returned*/
        var l_Count = gReturn.getElementsByTagName("item").length;
        /*For all elements of the tag item*/
        for(var i = 0;i<l_Count;i++){
          /*Get the item out of the XML*/
          var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
          /*Get the id of the item*/
          var l_ID = l_Opt_Xml.getAttribute('id');
          /*Get the element in the original page with the same id as
          **the item we have in the XML produced by the ondemand process
          var l_El = html_GetElement(l_ID);
          /*Now get the value of the item form the XML*/
          if(l_Opt_Xml.firstChild){
            var l_Value = l_Opt_Xml.firstChild.nodeValue;
          }else{
            /*There is no value*/
            var l_Value = '';
          if(l_El){
            /*There is an element with the same id as the item we are processing*/
            if(l_El.tagName == 'INPUT'){
              /*The element is an input item just set the value*/
              l_El.value = l_Value;
            }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
              /*If it is a span elment and has the class grabber
              **Then set the innerHTML of the parent to the value
              **and the id of the parent to the id
              l_El.parentNode.innerHTML = l_Value;
              l_El.parentNode.id = l_ID;
            }else{
              /*Else set the value as innerHTML*/
              l_El.innerHTML = l_Value;
      get = null;
    Now where it went wrong in your initial post
    The XML that was returned by your XML process would be something like
    <body>
      <desc>this xml genericly sets multiple items</desc>
      <item id="f02_1">CSS Mastery</item>
      <item id="f03_1">22</item>
      <item id="f04_1">Andy Budd</item>
      <item id="f05_1">1</item>
    </body>
    When you don't use apex_item to create your tabular form a item in the table will look like
    <input id="f02_0001" type="text" value="CSS Mastery" maxlength="2000" size="16" name="f05" autocomplete="off">
    Notice the id's f02_1 and f02_0001 don't match.
    So to make it work the XML would have to look like
    <body>
      <desc>this xml genericly sets multiple items</desc>
      <item id="f02_0001">CSS Mastery</item>
      <item id="f03_0001">22</item>
      <item id="f04_0001">Andy Budd</item>
      <item id="f05_0001">1</item>
    </body>
    To do that simply use lpad in the ondemand process like
    HTP.prn ('<item id="f02_' || lpad(:t_rownum,4,'0') || '">' || v_subject || '</item>');
    HTP.prn ('<item id="f03_' || lpad(:t_rownum,4,'0') || '">' || v_price || '</item>');
    HTP.prn ('<item id="f04_' || lpad(:t_rownum,4,'0') || '">' || v_author || '</item>');
    HTP.prn ('<item id="f05_' || lpad(:t_rownum,4,'0') || '">' || v_qty || '</item>');
    Keep in mind that the above is based on your original post and #ROWNUM# not being lpadded with zero's.
    Nicolette

  • How to fetch the value of tabular form item in javascript

    Hello all
    I want to do some calculations on the value entered by the user in the textfield of a tabular form, how can I fetch the value of tabular form item in the javascript?
    I am using normal tabular form, not using apex_item tabular form.
    I can pass the current textfield value to the function using "this" as a parameter, but how can I fetch the value of other rows of that same column?
    Thanks
    Tauceef

    Hi Alistair
    jQuery is still not working, but I got it done through some other means, this is the code:
    function total(pThis){
    var l_Row = html_CascadeUpTill(pThis,'TR');
    var l_Table = l_Row.parentNode;
    var l_Row_next = l_Row;
    var n_rows = l_Table.rows;
    var lInputs;
    var v1;
    var sum = 0.0;
    var temp;
    var i = 0;
    var j = 0;
    //alert(n_rows.length);
    while(j < (n_rows.length - 1))
    temp = 0;
    if(l_Row_next != null){
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    //alert(v1);
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    temp = 1;
    if(temp == 0){
    l_Row_next = l_Table.getElementsByTagName('TR')[1];
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    j= j+1;
    $x('P78_TOTAL').value= parseFloat(sum);
    I am calling this function onblur event of the textfield.
    Still I am having one problem, I want to perform this calculation on load of the page also, how can I do that? because while calling onblur of the textfield I can pass that textfield to this function but on onLoad how I will pass the textfield to call this function so that I will be able to get the textfield value in the function?
    there may be some rows already existing, so I want the total of the existing rows to be displayed in my P78_TOTAL textfield that is why I need to do this calculation on onLoad of the page.
    Thanks
    Tauceef
    Edited by: Tauceef on Jul 8, 2010 4:57 AM

  • Primary key column in manual tabular form

    I am creating a manual tabular form and am unsure what to do for my primary key column. When I do this with the wizard, I'm allowed to specifiy a Primary Key Source Type and the Primary Key Source (my sequence). Is there a way to do this in a manual tabular form?
    I'm creating the column with the call 'wwv_flow_item.display_and_save(2,hours_id) hours_id' but when I edit the 'Tabular Form Element' section, I don't have the Primary Key fields anywhere to edit...only Reference Table Owner, Reference Table/Column Name. Where can I specify the sequence?
    Thanks,
    Janel

    In the process ApplyMRD, try specifying the 'Secondary Key Column' in the section 'Source: Multi Row Update and Delete' to the second key column in the tabular form.
    I haven't tested this with your situation, but worth a shot.

  • How to assign values to columns in a tabular form

    hello,
    my tabular form allows insert on a table.
    some of the fiels in that table are not null and are hidden from the user.
    before submitting a new row the hidden columns needs to get their values
    from a database function.
    is there a way to do it in a tabular form? and how?
    Thanks,
    Iris.

    HI,
    depends you can use a bunch of different approach, however if you want to use tabular forms note that if you change the qry on wich is based the tforms usually you get an error (if you read around the forum this is because the MULTI PROCESS ROW is built on a table the time you use the wizard).
    If you need this function to 'work' with null value go to
    Tabular Form Element
    --> pl/sql expression or function and call your function in the db.
    Under my opinion if you want to have more control build a tabular form of yours and write your DELETE / UPDATE / INSERT statement and build your tabular form / report using the APEX_ITEM synthax.
    You can use as well a checkbox and loop to build your multirow process (that conditionally process the checked item).
    And if you have a common rules for a specific table i suggest you to manage these rules directly on the that table using triggers.
    hope it helps

  • Use value from tabular form column in the LOV where clause of another column

    Hi
    Using APEX 4.2 on 11g
    In a tabular form I want to filter the values in a Popup Key LOV based on the value of another column (same row).
    i.e. I want to get the value of one column and use it in the where clause for the Popup LOV on the same row.
    e.g. where COL 2 is a popup LOV
    COL 1
    COL 2
    1
    LOV SQL: SELECT a FROM b WHERE c = <value from COL 1>
    2
    LOV SQL: SELECT a FROM b WHERE c = <value from COL 1>
    3
    LOV SQL: SELECT a FROM b WHERE c = <value from COL 1>
    The value in COL 1 does not change once the row is created. It is a hidden ID field.
    Is this possible?
    Nick

    Anyone have any ideas?
    I thought getting the value from one column and using it in another column would be commonly used functionality... I just can't seem to work it out.

  • Date enable and disable in tabular form

    Hi All,
    i have date column in tabular form.
    when date column contain null value then it is enable to insert date.
    if it is not null then disable to insert date.
    how to achieve it.
    Please give me suggestion.
    Thanks,
    Prashant

    Hi Prashant,
    You have to know the name of the date column field using 'Developer Tool' of the browser (Click F12).
    You can achieve this by Dynamic Action as below,
    Event: Page Load
    Action: Execute JavaScript Code
    Code:
    $('input[name="f06"]').each( function(i) {
    var v_row= $(this).attr("id").substr(4);
      var v_val= $('#f06_'+v_row).val();
        var v_id= $('#f06_'+v_row).attr("id");
       if(v_val=='')
        $x(v_id).readOnly = "readonly";
        $x(v_id).style.background = "#F2F2F5";
       $($('td[headers="HIREDATE"] img')[i]).addClass('apex_disabled');
    Here f06 is the name of the date column i.e. HIREDATE. This code will disable the date column if it is NULL also disable the Calendar popup. Change this code according to your requirement.
    It will help you.
    Thanks
    Lakshmi

  • Check all checkboxes in a column of a tabular form

    Hi,
    I think this can be useful for some people.. I have a tabular form with several columns containing checkboxes. I wanted to be able to check or uncheck a whole column. The problem is that I didn't find a function to do this. So I modified (and renamed) the $f_CheckFirstColumn(pNd) function.
    In "edit page > JavaScript Function and Global Variable Declaration", add this :
    function $f_CheckNthColumn(c,n){
         var e=$x_UpTill(c,"TABLE");
         for(var d=0,a=e.rows.length;d<a;d++){
              var b=$x_FormItems(e.rows[d],"CHECKBOX")[n];
              if(b){
                   if(b.checked != c.checked) {
                        b.click();
         return;
    }EDIT : The status of the checkboxes checked with the function below is not passed when submitting the form (it is passed when clicking on every checkbox). This is why I had to use the click() function (so that onClick is triggered).
    --function $f_CheckNthColumn(c,n){
         var e=$x_UpTill(c,"TABLE");
         var f=[];
         for(var d=0,a=e.rows.length;d<a;d++){
              var b=$x_FormItems(e.rows[d],"CHECKBOX")[n];
              if(b){
                   f[f.length]=b;
         $f_CheckAll(false,c.checked,f);
         return f;
    And in the report column header :
    <input type="checkbox" onClick="$f_CheckNthColumn(this, NUMBER);" />NUMBER being the column number (1st column containing checkboxes = 0, 2nd column containing checkboxes = 1, etc.)
    I'm using APEX 4.1.1.00.23, so I can not guarantee It'll work on other versions.
    Hope this can help !
    Edited by: ben0123 on Jul 13, 2012 12:12 AM
    Edited by: ben0123 on Jul 13, 2012 1:17 AM

    Glad it helped :)
    If you have only one checkbox that is conditional, you could change the $f_CheckNthColumn function by adding this kind of condition :
    if ($x_FormItems(e.rows[d],"CHECKBOX").length == max_number_of_checkboxes || n < position_of_conditional_checkbox) toggle checkbox(n); // all the checkboxes are displayed, or the nth checkbox is before the conditional checkbox
    else // one (or more?) checkbox is missing
      if (n == position_of_conditional_checkbox) do nothing;
      else toggle checkbox(n-1);

  • How to find the ID of the text item of the column in an tabular form

    Hello,
    I have created a tabular form report on emp table and made ONE OF THE COLUMN department_id as an text item using APEX_ITEM.TEXT APIs.
    My select query is
    select
    "EMPLOYEE_ID",
    "EMPLOYEE_ID" EMPLOYEE_ID_DISPLAY,
    "FIRST_NAME",
    "LAST_NAME",
    "HIRE_DATE",
    "JOB_ID",
    "SALARY",
    "MANAGER_ID",
    APEX_ITEM.TEXT(3,department_id,20,50,'readonly=true') department_id
    from "#OWNER#"."OEHR_EMPLOYEES"
    now how can i find the item ID?
    one more thing is that how would i reference this item in an javascript function.
    anyone plz help me out with this.
    thanks.

    Hi,
    Firstly, your link must include "this" to ensure that any javascript knows which link has been clicked. So, change:
    onclick="javascript:report();"to
    onclick="javascript:report(this);"Next, your javascript code must take this value and find the related DEPTNO item on the same row. The URL must pass to the popup page the name of the ID that needs to be updated - this is held in the f10 variable in the following script. This means that you popup page must be able to receive this value so that it can use it to update the DEPTNO item when a value is selected. Your popup page seems to be page number 4, so I will assume that you have a P4_ITEM_ID hidden item on that page for this purpose. So, the javascript on the main page would be something like:
    function report(x)
    var f10;
    var p = x.parentNode;
    while (p.tagName != "TR")
      p = p.parentNode;
    var inputs = p.getElementsByTagName("INPUT");
    var zz;
    for (zz = 0; zz < inputs.length; zz++)
      if (inputs[zz].name = 'f10')
       f01 = inputs[zz].id;
    var url;
    url = 'f?p=&APP_ID.:4:&APP_SESSION.::::P4_ITEM_ID:' + f10;
    var w = open(url,"winLov","Scrollbars=1,resizable=1,width=450,height=600");
    if (w.opener == null)
       w.opener = self;
    w.focus();
    }So, when the user clicks a link, the report() function is called and the object clicked is passed as a parameter. The script then starts from this object and goes up to the TR tag that the link is on. From here, it finds all INPUT items and then looks at those to find one that has a name attribute of "f10". When it finds it, it stores the ID of that in the "f10" variable. It then constructs a URL using this variable which is set into the P4_ITEM_ID hidden item on the popup page.
    I don't know what your javascript is on the popup, but it would need to get the value out of P4_ITEM_ID to see which main page item needs updating. This could be something like:
    function passBack(val)
      var id = $v('P4_ITEM_ID');
      opener.document.getElementById(id).value = val;
      window.close();
    }This script looks in the P4_ITEM_ID hidden item and gets its value - this will be the ID of the item to update on the main page. It then does the update and closes the popup.
    Andy

  • Disable columns in a tabular form on select list

    I am trying to void out or disable certain columns based on the option value selected from the select list. I have done this on a form with regualr page items. However, I am now trying to accomplish the same on a tabular form. I have tried the following function and onChange event but it doesn't seem to be working. Any idea what could be wrong?
    var htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    function Disable()
    var sel = document.getElementById('f08_0001');
    if (sel.options[sel.selectedIndex].value != '5' || sel.options[sel.selectedIndex].value != '7') {
    document.getElementById("f04_0000").readOnly = true;
    document.getElementById("f05_0000").readOnly = true;
    } else {
    document.getElementById("f04_0000").readOnly = false;
    document.getElementById("f05_0000").readOnly = false;
    THe onChange event : onChange="Disable()"

    I've even gone ahead and tried th following code but still am having no luck
    function Disable(pThis)
    var currIndex = $('select[name="'+pThis.name+'"]').index(pThis);
    if (pThis.value=='2') {
    $('select[name="f04"]')[currIndex].disabled=true;
    } else {
    $('select[name="f04"]')[currIndex].disabled=false;
    }

  • How to hide/show columns in the tabular form

    Hi friends,
    I have a tabular form in my apex page. In the tabular form i have a check box as a one column, if i click that check box means, two more columns has to come or enable in my tabular form if i uncheck that check box means, two column has to disappear.
    How to achieve this in the tabular form.
    If it is an page item means, i can able to achieve it using DA. But for the tabular form which is like a report how i can able to achieve it friends.
    Thanks
    Brgds,
    Mini

    Hi,
    Anyone, can help me with this scenario.
    Brgds,
    Mini

  • 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.

  • Setting default value of Tabular form item is not working

    Hi,
    I have a tabular form and in that I want to set the default value of the username to app_user. So in the default value of the item, I wrote v('app_user') and type Pl/SQL, but that does not seem to work. I tried the static application & page item with :app_user. That threw an error.
    Also, I wanted to populate the date field in one column. Doesn't sysdate work?
    Thanks,
    Sun

    Bob, I did read that. MY problem is that it is still not working. I am wondering if this is because the table is in execute query mode maybe? I am wondering if the default value needs to be added after the tabular data is populated through some other way? Maybe the default value would work only for static non database items?
    ThanksYou're right, I just tested that using the default setup on the column in report attributes and it did not work.
    I think you'll have to update the columns with the default value post query but I'm not sure exactly what you need to do.
    I have a form that has a weight entry column. I tried changing the query to set the default value in the query
    from..
    Select Weight
    From...
    to
    Select 999.99 Weight
    From...That appeared to work, but the 999.99 value was not populated back to the Database since it wasn't entered through the form UI. APEX maintains the entered values internally so it can do its checksumm processing and update modified rows back to the DB. I'm thinking you could update what needs to be updated using Javascript in a Dynamic Action, but I'm afraid I don't know how to do that.
    Excuse my incorrect assumption when first replying.

Maybe you are looking for