Disable Item in tabular form in Apex

I would like to disable items in tabular forms.
If line status is Draft then all items of tabular form are enable other disable.
How to write this condition and where should i write because in dynamic action tabular Item is not showing...
Edited by: 926257 on Apr 9, 2012 12:53 AM

hi
926257
you can do that using java script
these links may helpful to you
<a href>Tabular form: how to dynamically enable/disable columns and rows
<a href>Tabular Form: Enable/Disable a field based on the status of a check box
<a href>http://www.codetoad.com/javascript/enable_disable_form_element.asp</a>
<a href>http://www.tizag.com/javascriptT/javascript-getelementbyid.php</a>
thanks and regards
pavan

Similar Messages

  • Conditionally disable items in tabular form

    I built a tabular form . One of the column has dropdown called 'Type'. If users select type 'R' i want to disable 2 fields(text3 and text4) and in type is 'P' i want to disable other 2 fields(text5 and text6).
    I started off by including the foll. in the HTML header for page
    <script language="JavaScript1.1" type="text/javascript">
    function disableItem(pThis) {
    //alert(html_SelectValue(pThis));
    var l_soft = (html_SelectValue(pThis)== 'R');
    html_disableItems(l_soft,'TEXT3','TEXT4');
    </script>
    In the Column Definition of LOV, I added the onchange="javascript:disableItem(this);" for Element Attributes.
    The problem is, this code is disabling column header for TEXT3 and TEXT4 rather than disabling the fileds. Can someone help me to make this work.
    Thanks in advance.

    I'm using a similar thing in my app and it works fine. I have the disableFields() function in HTML header. Then in footer, I have something like:
    <script language = "javascript">
    if($x('type').value=="P" || $x('type').value=="R")
    {disableFields();}
    </script>
    Make sure the item named "type" is a select list with submit, and there is a page branch going to the same page. Also, in javascript, everything is case sensitive...make sure ur item names are in the proper case.

  • Query for create manual tabular form using apex collection using item textfield with autocomplete

    can we create a manual tabular form inside item textfield with autocomplete ?
    how it is possible?
    with Apex_item API used for this item.
    i used this code for creat  cascading select list
    select seq_id,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
            p_idx                       =>   1,
            p_value                     =>   c001,
            p_query                     =>   'SELECT C001 D
         , C002 R
      FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = ''col1''',
            p_attributes                =>   'style="width:150px" onchange="f__name(this,parseInt(#ROWNUM#));"',
            p_show_null                 =>   'Yes',
            p_null_value                =>   null,
            p_null_text                 =>   '- Select name -',
            p_item_id                   =>   'f01_'|| LPAD (ROWNUM, 4, '0'),
            p_item_label                =>   'Label for f01_#ROWNUM#',
            p_show_extra                =>   'NO') name,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
            p_idx                       =>   2,
            p_value                     =>   c002,
            p_query              =>   ' SELECT null d, null r FROM dual WHERE 1 = 2
            p_attributes                =>   'style="width:150px"',
            p_show_null                 =>   'Yes',
            p_null_value                =>   null,
            p_null_text                 =>   '- Select name -',
            p_item_id                   =>   'f02_'|| LPAD (ROWNUM, 4, '0'),
            p_item_label                =>   'Label for f02_#ROWNUM#',
            p_show_extra                =>   'NO')name2,
    from apex_collections
    where
    collection_name = 'COLLECTION1'
    It is fine .
    but i want item in tabular form  textfield with autocomplete and remove select list. my requirement is using textfield with autocomplete select a employee name and second item textfield with autocomplete display dependent perticular employee related multiple task.
    how it is created.i have no idea related textfield with autocomplete.Please help me....

    pt_user1
    I understand that the add row button is currently doing a submit.
    To not submit the page you need a dynamic action on the page.
    Does the javascript function addRow do what you want?
    Otherwise have a look at the following two threads Add row in manual tabular form using dynamic action and Accessing Tabular Form & Add Elements to Collection without Page Submit.
    You're process could be something like:
    Add the new values to the collection using the idea's in the second thread and at the same time add the new row.
    And as second action refresh your tabular form.
    If you get stuck set up what you have done on apex.oracle.com using the tables from the demo application.
    Nicolette

  • Disable column in tabular form

    Hi,
    I am working on apex4.1 ,working on tabular form . i want to disable columns in tabular form.
    I Have debit and credit column in tabular form.These columns are multiply by exchange rate.
    if i have multiplication of Debit_prod =debit*Exchange_rate then
    credit column should be disable, and if Multiplication of cr_prod =Credit*Exchange_rate
    then dr column should be disable.
    Thanks in advance.
    Thanks & Regards
    Vedant
    Edited by: Vedant on Sep 20, 2012 4:14 AM

    Hi,
    Thanks for reply.
    I am entering the value in tabular form. As i fill debit or credit column of the tabular form,Then if value in the debit column i have entered ,then on press tab control switch to exchange rate column , credit column should not be enterable and vice versa.
    Thanks & Regards
    Vedant

  • Query for create manual tabular form using apex collection add row button functionality

    Hello everyone
    My requirement is i created a tabular form manually using apex collection but if i click on add row button then previously selected data refreshed and added new row in this form it is fine.but i don't want to refreshed previously selected data and click on add row button then add new row .how it is possible? plz help
    Thanks & Regards,
    Ujwala

    Ujwala
    Instead of starting a new thread with the same question as Query for create manual tabular form using apex collection add row button functionality.
    Could you answer the question about what you see while debug the javascript code.
    If you don't understand the question or have trouble debug javascript let us know.
    Nicolette

  • Not null and enable or disable  column in tabular form

    Hi,
    Using apex version 4.1 and working on tabular form.
    ACT_COA_SEGMENT_MAS is Master table
    and
    ACT_SEGMENT_VALUES_MAS is detail table
    I have entered 8 rows in master table and PARENT_SEGMENT_ID is column in master table which is null able. If i specified PARENT_SEGMENT_ID with value in master table then in detail table there is column PARENT_ID that should not be null and enable.
    How i can enable or disable column when in master table PARENT_SEGMENT_ID column is null then in detail table PARENT_ID column should disable and vice versa.
    I have created tabular form on Detail table. before insert into the tabular form Check in master table in first entry if PARENT_SEGMENT_ID is not null in first row of master table then in tabular form PARENT_ID should enable and not null able in corresponding to this first row id's lines in tabular form.
    Same should check for second row in master table if PARENT_SEGMENT_ID is not null then entered rows with PARENT_ID into tabular form corresponding to 2nd id in master table should not nullable and column should enable in tabular form.
    Thanks & Regards
    Vedant
    Edited by: Vedant on Jan 9, 2013 9:12 PM

    Vedant,
    You need to create you own manual tabular form and not use the wizard.
    Using APEX_ITEM api you should be build you own form and you will be able to control how you wan to display the rows. (See Link [Apex Item Help|http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CACEEEJE] )
    select case when PRIMARY_TABLE_COLUMN is null then APEX_ITEM.DISPLAY_AND_SAVE(3 , DETAIL_COLUMN ) else APEX_ITEM.TEXT(2,detail_column) end "ALIAS" from detail table
    Hope that help.
    Vivek

  • Null Validation in Tabular Form in APEX 4.2.2

    Hi to all respected Gurus of this Forum!
    Recently downloaded APEX 4.2.2. As we know that this version has some improved features and one is the best is i.e. *"Validation on Tabular Form".*
    For test purpose I succeeded to apply validation on field of tabular form and I am not allowed to "SUBMIT" data as per Validation Rule.
    But now, I want to customize that validation as per below logic.
    If required field is null than a message-box should appear with two buttons , as under:
    Blank field not allowed. Do you really want to submit? (Buttons should be = YES NO)
    If user press "YES" then validation should be false and record should be saved
    AND
    If user press "NO" then no data should be submitted/inserted as per validation logic.
    Please help. Your as usual cooperation is highly appreciated in advance.
    Regards
    Muhammad Uzair Awan
    ORACLE APEX Developer
    Pakistan

    Hello Sabine,
    >> I read about enhanced validation in 4.1 and would love to get rid of g_f-programming.
    The major “trick” is to associate the validation/process with a Tabular Form. On the first screen of both wizards, the first field is Tabular Form. You must select the tabular form on your page (currently there can be only one. In future versions this will change).
    Another factor that might influence the behavior of Tabular Form validation/process is the new attribute of Execution Scope. Unfortunately, you must enter Edit mode to gain access to this attribute (i.e., it can’t be set directly from the Tabular Form create wizard). Set it according to your need.
    The rest is very simple. You should treat your Tabular Form as a simple form, where every column header stands for a form item. The following is a very simple example of validating the SAL column:
    if :SAL < 1500 then
      return 'Sal Value is under 1500';
    else
      return null;
    end if;In this validation I’m using the Function Returning Error Text type.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • How to disable row in tabular form when checkbox checked?

    Hi.... this is what i want to do....
    I created tabular form for offering items... there is a checkbox that is used to select item with lowest price...
    But i have also one column that shows item options ( option is for example... i want offer for 22" monitor Samsung, but seller have only 22" LG monitor.... so in my offering will be shown item (22" monitor Samsung) that i want, and in row below item (22" LG monitor) that seller have... both items will have same order id....
    Next thing i want to do is when i select checkbox with item (22" LG monitor) as lowest price, i want that row with same order id (22" samsung monitor) is disabled.
    Is that possible to do?
    This is my code for creating tabular form:
    SELECT
    CASE WHEN RED_BR_OPCIJE = 0 THEN '-' ELSE TO_CHAR(RED_BR_OPCIJE) END RED_BR_OPCIJE,
    apex_item.hidden(1, ID_STAVKE)||
    apex_item.hidden(2, ID_STAVKE_IZ_ZAHTJEVA)||           ---order_id
    apex_item.hidden(3, ID_PONUDE)||
    apex_item.hidden(4, ODABIR_NAJPOVOLJNIJE_STAVKE)||     
    apex_item.checkbox(5, '#ROWNUM#', null, decode(ODABIR_NAJPOVOLJNIJE_STAVKE, 'X', '#ROWNUM#')) Odabir,    ---checkbox_lowest price
    apex_item.textarea(6, NAZIV_ARTIKLA_TRAZENO, 3, 40, 'readonly="readonly"') NAZIV_ARTIKLA_TRAZENO,
    apex_item.textarea(7, NAZIV_ARTIKLA, 3, 40, 'readonly="readonly"') NAZIV_ARTIKLA,
    apex_item.text(8, SIFRA_ARTIKLA, 8, 20, 'readonly="readonly"') SIFRA_ARTIKLA,
    apex_item.text(9, JMJ, 5, 20, 'readonly="readonly"') JMJ,
    apex_item.text(10, KOLICINA, 6, 20, 'readonly="readonly"') KOLICINA,
    apex_item.text(11, JEDINICNA_CIJENA, 12, 20, 'readonly="readonly"') JEDINICNA_CIJENA,                                      ---price
    apex_item.text(12, IZNOS_STAVKE, 12, 30, 'readonly="readonly"') IZNOS_STAVKE,
    apex_item.text(13, IZNOS_RABATA, 12, 20, 'readonly="readonly"') IZNOS_RABATA,
    apex_item.text(14, JEDINICNA_CIJENA_NAKON_POPUSTA, 12, 20, 'readonly="readonly"') JEDINICNA_CIJENA_NAKON_POPUSTA,
    apex_item.text(15, IZNOS_STAVKE_NAKON_POPUSTA, 12, 20, 'readonly="readonly"') IZNOS_STAVKE_NAKON_POPUSTA
    from PONUDE_STAVKE
    where ID_PONUDE = :P34_ID_PON
    ORDER BY ID_PONUDE ASC, ID_STAVKE_IZ_ZAHTJEVA ASC, RED_BR_OPCIJE ASC
    And this is example table with a few column names:
    order_id      option_number               item_name                      price         checkbox_lowest price
    1086                    -                Samsung 22" monitor              100$                 null                ---this row should be disabled because next row is selected as lowest price
    1086                    1                LG 22" Monitor                    90$                 X                   --- both rows have same order_id
    1050                    -                Router                            100$                X

    Hi snake2903,
    {thread:id=998140}
    {thread:id=1554583}
    {thread:id=2249233}
    Hope it helps!
    Regards,
    Kiran

  • How to retain value in LoV item in Tabular Form, after Page Refresh

    Hi,
    I have a tabular form, which contains 2 items(columns), of type "Select List - named LoV".
    Now, 2nd item(column) in tabular form, that LoV should get populated based on user's selection value in first item LoV.
    1. So how do I refer to the value, that user selected in first item's LoV? I will have to use this value as reference in LoV query of my 2nd item ( on this tabular form)
    2. Everytime I select value in first item LoV, page gets refreshed, as my requirement is to calculate 2nd item's LoV based on selected value in first item. So after this page refresh, first item LoV loses its value that was selected before the page refresh happened. So how do i retain this value in first item LoV? I have an unconditional process, that on every submit(refresh) of page, I set all my items with their corresponding values. But problem is what do i mention there to refer to this first item ( of type LoV) of tabular form?
    I looked in view source of my page, this item is referred as f03.
    So i used "apex_application.g_f03", to set this item to its value, in my uncoditional submit process. But it did not work. I tried to refer this item as "f03" in this unconditional submit process. But still it did not help, the selected item loses its value after page refresh(submit).
    Please help.
    Thanks and Regards,
    Ravi.

    Hi Rave,
    You will have to use Javascript and Ajax to change the values as ApEx submissions will lose your results unless they are saved into the database.
    Remember, that as you are using a tabular form there will be lots of items called f01, fo2, fo3 etc on the page (one per row).
    Regards
    Michael
    Edited by: MKii on Jun 4, 2009 10:13 AM

  • Checkbox disable/ enable in tabular form

    Hi,
    I am using apex4.2,
    i have column "ACTIVE" in tabular form. it is simple check box type return value "Y/N".
    i want if i tick on one check box of active column then other check box should disable , and selected checkbox should have a value of "Y" and other check box should have value of "N".
    how i can do this?
    Thanks & Regards
    Vedant.

    Vedant wrote:
    Hi,
    Could you help me to write the code. My column in tabular form are 13,14,15,16
    If i enter value in field 13 then 14 and 16th column should disable and
    If i enter value in field 14 then 13 and 15th column should disable.
    How i can do this?
    Thanks & Regards
    VedantI haven't tested this code; but the following can be your approach:
    In the "Element Attributes" field of the 13th column, you can call a javascript function as:
    onblur = "javascript:updateCols(this);"In your browser, right-click each of your columns (one at a time) and choose "inspect element" to check the HTML element attributes. Assuming that the 13th column in your tabular form is rendered in the HTML as f13, 14th column as f14, 15th column as f15 and 16th column as f16, write this JS function in the page HTML header:
    <script language="JavaScript" type="text/javascript">
    function updateCols(pThis)
        var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
       if (pThis.value.length > 0)
           $('#f14_'+vRow).attr('disabled',true);
           $('#f16_'+vRow).attr('disabled',true);
       else
           $('#f14_'+vRow).attr('disabled',false);
           $('#f16_'+vRow).attr('disabled',false);
    </script>The above JS function is fired when the user tabs out of the 13th column. The function then checks the length of the value entered by the user in the 13th column. If the length is greater than 0, it disables the 14th and 15th columns. Else, it enables them.
    The above code is for your first scenario:
    If i enter value in field 13 then 14 and 16th column should disableYou can do the same for the other scenario.
    Hope this is clear. Or else, give me access to your workspace and I can try the above there.

  • How to generate specific # of items in tabular form from one item

    Looking to display or render additional elements to a tabular form based on the number entered in a quantity field. ie. if someone orders 10 items, I would like to have 10 tabular items display on blur, so the operator can enter the data in those fields for the 10 items. Then of course I need all items processed on submit.
    Is there a way to do this so the # of line items are rendered after a quantity has been entered to match or is this something that would have to be done with display values and a set number of items already on the page?
    Thanks

    Hi Naresh,
    You need to use Billing Plans for Service Contracts Scenario to create BRI items.
    In the Billing Plan - you can assign whether it is a Periodic Billing or Milestone Billing. Then you need to assign this billing plan to item categories. So based on the period (monthly,quarterly,yearly) - the BRI items will be generated.
    So Please try using Billing Plans for your scenario. As you mentioned earlier, you are using ECC for all Billing purposes. So the system will create one Debit Memo Request document per Contract and it will each line item for each of the BRI's in Service Contract. System will not generate one DMR per BRI item.
    You can check the BRI items generated at the item level --> Billing Plan Tab page (Assignment Block in Web UI).
    Hope this helps.
    Regards,
    Siraj

  • Tabular form in APEX 4.0

    Hi everyone,
    We use Apex 4.0.
    In a tabular form, we have two fields that the second of them depend on the first.
    For example in the case of a departement and employees list.
    Is it possible to acheive that when we select a value in the first list the second one depend on the first ?
    How we can reference the first list but we don't have names ?
    In a form region for example we have element name to relate to not in a tabular form
    Is it necessary to use Collection for this case?
    Thanks in advance. Bye.

    See: https://apex.oracle.com/pls/apex/f?p=39006:16:
    http://dbswh.webhop.net/dbswh/f?p=BLOG:READ:0::::ARTICLE:2003800346210117

  • Unique item on tabular form

    Hi,
    Can somebody help me with a unique item on a tabular form.
    I have atabularform with 3 column. One column CODE must be unique. How should this be done??
    Regard,
    Ekas

    Add a unique trigger on the table, so the column can NOT be duplicate.
    Thank you,
    Tony Miller
    Webster, TX

  • What's the deal with 'no data found in tabular form' in apex 4.1

    We recently upgraded to 4.1 to resolve some of the issue found in 4.0. I have a form that populates a collection....it had previously worked in earlier versions and now I receive the following error when I try and SAVE.
    any thoughts?
    Contact your application administrator.
    no data found in tabular form

    HI Joel, thanks for getting back to me.
    We recently moved from apex 4.0 to 4.1. I have an application that makes use of collections. All was working in 4.0, but now I am having problems with 4.1. I would be happy to move place application in more convenient spot, but need specific instructions as I am not certain how to do that.
    basically, I have a report region, FAVORITES based on a collection (source listed below):
    SELECT apex_item.checkbox (1,seq_id, 'onclick="highlight_row(this,'
    || seq_id
    ||')"', NULL, ':', 'f01_'
    || LPAD (seq_id, 4, '0') ) delete_checkbox,
    apex_item.hidden(2,seq_id) seq_id,
    apex_item.hidden(3,seq_id),
    apex_item.text_from_LOV(c004,'SPECIES')SPECIES_ITIS,
    apex_item.text_from_LOV(c005,'GRADE')GRADE,
    apex_item.text_from_LOV(c006,'MARKETCODE') MARKET_CATEGORY,
    apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
    apex_item.text(8,c008,5) fav_order,
    apex_item.select_list_from_lov
    (9,
    c009,
    'DISPOSITIONS',
    'style="width:200px;background-color:#FBEC5D; "',
    'YES',
    '0',
    '- Select Disposition -',
    'f09_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO'
    ) disposition_code
    from apex_collections
    where collection_name = 'C_DEALER_SPECIES_FAV' order by seq_id desc, c008
    The collection appears and I am able to add rows to this collection. The problem is when I SAVE. The following is executed (and again, works fine in 4.0).
    declare
    dispositionCode varchar2(3);
    begin
    delete from frequent_species where permit_id = :G_permit_id;
    for rec in (select c004,c005, c006, c007,c008,c009,:G_permit_id from apex_collections where collection_name = 'C_DEALER_SPECIES_FAV')
    loop
    if rec.c009 = '0' then
    dispositionCode := null;
    else
    dispositionCode := rec.c009;
    end if;
    insert into FREQUENT_SPECIES (species_itis, grade_code, market_code, unit_measure, fav_order, disposition_code,permit_id) values(rec.c004,rec.c005, rec.c006, rec.c007,rec.c008,dispositionCode,:G_permit_id);
    end loop;
    exception when no_data_found then null;
    end;
    I receive the message:
    Contact your application administrator.
    no data found in tabular form
    Return to application.
    Let me know what you think. thanks for your help. Karen

  • Reg. DDL in Tabular form in Apex

    Hi,
    I have used a select list in Tabular form report. My select list is retrieving only 21 rows.
    But the performance is very slow. Please help me to increase the speed of processing.
    Thanks,
    Madhu

    Hello Madhu,
    Can you post the query of your select list - and of your tabular form (or report). Why do you assume the problem is in the select lst? What happens to the performance if you omit the select list?
    Regards,
    Roel
    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.logica.com/

Maybe you are looking for