Select list enable / disable in tabular form

Hi,
I have created report on (ACT_COA_SEGMENT_MAS) table and this is master table , and created link on this report, when i click on report link, control moves to tabular form that is based on detail table (ACT_SEGMENT_VALUES_MAS)
In master table there is column,
SEGMENT_ID number primary key;
QUALIFIER varchar2(1);
If in master table qualifier column value is 'N' then
then in detail table (ACT_SEGMENT_VALUES_MAS) column account type cannot be null and column should enable.
If in master table QUALIFIER column value other than 'N' then Account column in detail table should disable . and value should not be enterable.
and ACCOUNT_TYPE column in deatil table is a select list.
How i can do this?
Thanks & Regards
Vedant
Edited by: Vedant on Jan 10, 2013 10:14 PM

Vedant wrote:
If in master table qualifier column value is 'N' then
then in detail table (ACT_SEGMENT_VALUES_MAS) column account type cannot be null and column should enable.
If in master table QUALIFIER column value other than 'N' then Account column in detail table should disable . and value should not be enterable.
and ACCOUNT_TYPE column in deatil table is a select list.
How i can do this?One way - sadly a bit of work - would be to use APEX_APPLICATION_ITEM to generated the detail items as a manual tablular form where you can control the disabled property when generating the tabular form fields using CASE statements, writing manual PL/SQL processes and the built-in APEX_ITEM collection to manually perform insert/update/delete operations on submit. Check the documentation for the full syntax of using APEX_ITEM functions to generate HTML items.
An example from the Oracle docs looks like
SELECT
  empno,
  APEX_ITEM.HIDDEN(1,empno)||
  APEX_ITEM.TEXT(2,ename) ename,
  APEX_ITEM.TEXT(3,job) job,
  mgr,
  APEX_ITEM.DATE_POPUP(4,rownum,hiredate,'dd-mon-yyyy') hiredate,
  APEX_ITEM.TEXT(5,sal) sal,
  APEX_ITEM.TEXT(6,comm) comm,
  deptno
FROM emp
ORDER BY 1where the disabled property could be specified in the unlisted fifth argument to APEX_ITEM.TEXT. The first item to the APEX_ITEM calls is a number defining the G_FXX global variables so that 1 identifies the item later as apex_application.g_f01(9) - 9 being symbolic for a collection identifier -, ename as apex_application.g_f02(i),m and so on. The G_F99 items can be reference on submission in Pl/SQL processes through looping, something like (this example assumes all array items are populated - under some circumstances they may not be)
for i in 1..apex_application.g_f01.count loop
  update my_table set sal = apex_application.g_f05(i) where empno = apex_application.g_f01(i);
end loop;Edited by: riedelme on Jan 11, 2013 7:12 AM

Similar Messages

  • Cascading select list issue in a tabular form

    hello,
    how can i implement cascading select list for filtering my tabular form report results.
    Like i want to have the cascading select list above the tabualr form report such that when i select the value and try to click a button, my tabular form report 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 help me out with cascading select list.
    thanks.

    Thank you so much for the quick response saved my life!.
    For future reference let examples of the use of APEX_UTIL.SAVEKEY_VC2 and APEX_UTIL.KEYVAL_VC2
    This is the query of the Tabular Form
    SELECT   den.cod_encuesta,
             den.cod_det_encuesta,
             den.cod_pregunta,
             pre.nombre_pregunta,
             den.respuesta,
             den.observaciones,
             APEX_UTIL.SAVEKEY_VC2(den.cod_pregunta) codpreg
      FROM   enc_det_encuesta den, enc_pregunta pre
    WHERE   den.cod_pregunta = pre.cod_pregunta  
       AND   den.cod_encuesta = :P6_COD_ENCUESTAThis is the query "Select list"
    SELECT   nombre_respuesta, cod_respuesta
      FROM   enc_respuesta
    WHERE   cod_pregunta =  APEX_UTIL.KEYVAL_VC2regards
    Gerard

  • Is there a way to enable/disable a tabular form item based on the value of a second item?

    Hi Everyone,
    I have a tabular form based on a collection.   The column c050(maps to f30) will be either Y/N.  If it is Y, then I would like to enable column c024( maps to f24) (which happens to be a radio button based on lov).  If the value of c050 = N, then disable c024.   There are potentially many rows, and the item c024 would only be enable/disabled for the specific row.   So if row 1 has c050=Y and row 2 has C050=N then row 1 c024 is enabled, and row 2 c024 is disabled.  Hope that makes sense.
    I have created a dynamic action called enable/disable HMS fields.
    event=CHANGE
    selection type = jquery selector
    jquery selector = input[name='f30']
    condition EQUAL TO
    value Y
    true action1 - enable, jquery selector, input[name='f24']
    true action 2 - alert, You have added an HMS Species.   There may be additional data to enter.  thanks
    false action1 - disable jquery selector, input[name='f24']
    false action2 - alert, no hms worries.
    The alerts in both cases show properly...but nothing seems to happen to f24.....what am I doing wrong?
    thanks

    Agh! This is the first time you mention this is a radio button!  That changes things a lot! As you can see, the format is different (f24_0001_0001) than what we have discussed (f24_0001).
    Radio buttons have their own quirks.  My bad, I should have asked what you had.  But since you said your original selectors on input were working I just thought these were text fields or something like that.
    How about you change it to a drop down list just so that you can see all work?  And fully understand it.
    Then you can work out the radio button option.
    If that doesn't get you there... I'm going to ask you setup an example in apex.oracle.com and give me credentials to log in and take a look.
    I could re-try the js on my side with a radio but it will take some time.
    So just to be clear... f30 is a drop down and f24 is a radio?
    See, this line:
    $x_disableItem("f24_" + row, true);
    Is NEVER going to find the radio buttons because it's missing the 3rd 0001 and 0002 (how many options do you have?)
    So perhaps you try it like this:
    $x_disableItem("f24_" + row + '_0001', true);
    $x_disableItem("f24_" + row + '_0002', true);
    ... keep going for the options...
    Do the same for the false of course.
    But I think this needs a better approach if you'll have radio buttons.  I just need to work it out.
    Ok, go try things...
    Thanks
    -Jorge

  • Select list filter in a tabular form problem

    Hello everyone:
    I need to filter a list in a tabular form, depend on another column value in the same row of the Tabular Form
    Try using the syntax *#COLUMN#* in the query of select list but did not work.
    This is my query
    SELECT   nombre_respuesta, cod_respuesta
      FROM   enc_respuesta
    WHERE   cod_pregunta = #COD_PREGUNTA#There is another way I can refer to the value of a column in the same row?
    regards
    Gerard

    Thank you so much for the quick response saved my life!.
    For future reference let examples of the use of APEX_UTIL.SAVEKEY_VC2 and APEX_UTIL.KEYVAL_VC2
    This is the query of the Tabular Form
    SELECT   den.cod_encuesta,
             den.cod_det_encuesta,
             den.cod_pregunta,
             pre.nombre_pregunta,
             den.respuesta,
             den.observaciones,
             APEX_UTIL.SAVEKEY_VC2(den.cod_pregunta) codpreg
      FROM   enc_det_encuesta den, enc_pregunta pre
    WHERE   den.cod_pregunta = pre.cod_pregunta  
       AND   den.cod_encuesta = :P6_COD_ENCUESTAThis is the query "Select list"
    SELECT   nombre_respuesta, cod_respuesta
      FROM   enc_respuesta
    WHERE   cod_pregunta =  APEX_UTIL.KEYVAL_VC2regards
    Gerard

  • 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

  • Populate select list when a date selected from date picker in tabular form

    Hi Guys,
    I have a situation where user picks a date from a date picker in tabular form.
    So as soon as he picks a date say 05/31/2011 from the date picker I want to populate a select list with 2 values : Tuesday AM , Tuesday PM.
    I have gone through the forums a lot and figured we can write a Dynamic Action using JQuery Selector. But I am not sure how to figure out the day from a date picker.
    I appreciate if some one can give your thoughts on how to proceed. It seems to be simple but looks like a tricky one. I am not familiar with writing Java Script.
    Thanks ,
    Raj

    I was thinking your date selected from CALENDAR ended in a list_item.
    I don't know I thinking that
    well,
    :master_block.itemdate is your text_item where calendar return date selected.
    and then , following Gerd's step
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :master_block.itemdate := calendar (.........);
    go_block ('master-block');
    execute_query;
    end;
    or set a global or parameter variable date selected from calendar :parameter. xxxxxx
    in a PRE-QUERY
    :master_block.itemdate := :parameter. xxxxxx
    and
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :parameter. xxxxxx := calendar( ....);
    go_block ('master-block');
    execute_query;
    end;
    regards

  • Select List with Submit - Branch Error - form data does not save

    I am a new APEX user so please excuse my ignorance. I have created a simple application in which a primary data entry form branches either to a detail form (one to many on the parent ID) or a master tabular report used for navigation. These branches work fine. Then I tried to get a little fancy with a conditionally displayed element based on the value the user selects in a select list on the main form(P9_REPORT_TYPE). I converted the select list to a select list with submit and created a new branch (on submit - after processing) to the current page (Page 9) to avoid the "no branch found" error. To avoid the branch being unconditional, I tried to use the 'Request = Expression1' condition with the Expression 1 field set to P9_REPORT_TYPE. The behavior I get is that the page seems to submit but the data on the form is not saved -- even the new value selected in P9_REPORT_TYPE reverts to the old value. I simply need the page data to submit so that the conditionally displayed element will take effect (which it does if you use one of the other button-based branches and then return to the form). Do I have the syntax wrong? It seems like this should be straightforward but I've tried a number of options including using a PL/SQL condition V('REQUEST')='P9_REPORT_TYPE' with no success. I'm guessing that the value of Request is getting cleared before it has a chance to trigger the branch? Any help would be greatly appreciated.

    Exactly so! Thanks Scott for setting me straight. For the benefit of other readers, the value in the Source Used column had been set to "Always, replacing any existing value in session state" and should have been set to "Only when current value in session state is null".

  • Select query based LOV for tabular form attributes

    Hi HTMLDB Team,
    Congrats u all for the new release of HTMLDB in htmldb.oracle.com.
    I badly need a solution of the below problem.
    Say , i have table called user_col_comments now i want to display the table_name ,column_name and comments in a tabular form.I displayed only one row for the tabular form.Now i create a select query based LOV for attribute table_name where i got all table_name in drop down list.
    Point is that after selecting any data from drop down table list i want to get the corresponding fields to be populated in column_name attributes.How can i wrote the select query based LOV for the attibute column_name.
    I wrote it as 'select column_name d,column_name r from user_col_comments where table_name=:TABLE_NAME Its not working?
    Similarly i want same thing to display for comments after matching both table_name and column_name.
    Any solution to get rid of those problem will be highly appreciable...
    If u need my htmldb.oracle.com userid and password to solve the problem i will sure let u email it.
    Cheers,
    Eman

    hi rchalton,
    can u plz little bit more clearer .I know hopefully u can imagine the problem and may u guide me thru proper way.....One think i understand that there must be multiple process and submit but "only when..." that u have said i cant understand that part........
    U are welcome to give me proper solution.....
    Thanks for the reply ....atleast one can pay hid to me.....
    Cheers,
    Eman

  • Multiple select list for one field in form

    Friends,
    I have a form , which is having many fields. One of the field are day/date. In this field i have to take 3 dropdown lists. like one for date, one for day and another for year. I have created three lov's for the day,date and year but for the field day/date i am able to apply only one lov. Any way so that i can display all the three lov for one field
    example
    day/date: day -- (dropdown list)
    date -- (dropdown list)
    year -- (dropdown list)
    thanks in advance
    adi
    Edited by: Adi's on Feb 16, 2010 11:46 PM
    Edited by: Adi's on Feb 16, 2010 11:47 PM
    Edited by: Adi's on Feb 16, 2010 11:52 PM

    nope, I just gave u an example to combime day , date and year fields in one select list, it does not matter whether they are in one table or multiple table and you dont require to create any tables for this, I assumed your lov for day / date / year are dynamic not static.
    Regards,
    Shijesh

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

  • Cascade Select list with Tabular Form

    Hi,
    I am trying to implement Cascade Select List functionality on a tabular form where users should be able to add multiple rows. The data should be saved to a temporary stage area, where users can review the data prior to saving to the table. Very similar to the shopping cart where one can Delete/Update rows by record. I believe there is a way to do it via APEX Collections. If anyone has an example it would definitely help. FYI, Running on APEX 3.2, so no built in cascade functionality.
    Thank you,
    Chandu

    If you received a reply or figured out how to do this, can post? I need to implement exact same functionality and have not figured out how to do so. Have pinged Denes K. for source code on his demo app but not yet received response. Can this be done using wizard tab form or does it have to be a manually tab form?

  • APEX Ajax Cascading Select List Tabular

    Hi everyone,
    We’re developping in APEX 4.X.
    I went to your blog « Denes Kubicek - ApEx Solutions », it’s very interesting
    http://apex.oracle.com/pls/otn/f?p=31517:176:384744492803038:::::
    I tried to create something as Mr Kubicek did to get an Ajax Cascading Select List Tabular.
    In step 5, he says the rest of the code if you apply for an account". Do we need to add a lot of code to get success ?
    Is there someone who tries to do like Mr Kubicek did ?
    Thanks in advance. Bye.
    Eric.

    Hi everyone,
    I looked at Mr Kubicek solutions about tabular form and I asked him to get access to his workspace. But I’m not sure to get all I need.
    I have a two select list named Activities and Entity. I want that Entity depends on Activities. Those list values come from respectively table h4_activities and h4_activity_entity.
    But, when I show the tabular form, I want to see records which is in table h4_activity_day. I don’t want to see only my two select lists.
    I think tabular form should be interesting.I want your advice.
    But, I need something like a select list with a LOV and SOURCE.
    Thanks in advance.
    Have a great day. Bye
    Eric

  • Tabular Form - Read only condition for certain users

    Is it possible to make a select list field in a tabular form read-only to certain users? Here's the situation:
    The tabular form lists the users who need to select "Approve" or "Reject" in that field (they are approving or rejecting an engineering change)
    I want all of them to see the approval/rejection of their team, but only have access to edit the select list associated with their record.
    Thanks in advance.
    Apex 4.0.0.00.46

    You could use either "authorisations" tab or "conditional display" for the relevant column attribute.
    Report Attributes->Column Attributes->authorisationsIt would be better to have some more detail about what you are trying to get (maybe a quick mock up of the form, for example) but, I can envision something along the lines of the following:
    For each approval/rejection field:
    1. Create an authorisation appropriate for access to to each approval/rejection field e.g. authorisation scheme "FOO"
    2. In the relevant fields column attributes, set the authorisation to "FOO"
    3. now create a read only "public" copy of the above field, using the "display as text (based on LOV does not save state)" - set the authorisation for this field as "{NOT FOO}"
    (if you don't want to use authorisations, you could build an equivalent using "conditional display" instead, which is basically the same thing, except column specific)
    The downside is of course that you're duplicating fields in your query, which creates a bit of redundancy. There may be better ways to achieve this (maybe you could make use of the APEX_ITEM api, for example) but this is fairly easy to set up IMO.

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

  • Select list within a report

    Hi All
    I need help creating a report with the first column as a select list and the other columns (4 of them) will auto populate based on the selected item. This is a report region on form that will update a table when submitted.
    My Table: Cost Center
    Cost Center Id - PK
    Cost Center
    Variable
    Object Code
    Department Accumaltor
    Year
    The user would select a cost center from a dropdown within the report and the other values would be filled in.
    So far I have created the select list and created a tabular form.
    I'm sure if I need to even use this type of report because the user will be able to add a new record if necessary.
    I think I need a process to retrieve the rest of the info from the table once the user made a selection. But where would I put that?
    I've read many posts that are similiar but I need some guidance.
    Thank You
    Moe

    Hi I wanted to include the code I'm trying to use based on various posts I found:
    I found this suggestion on Denes Kubiek site and tried to modify it to be used in a report with dropdown. Un fortunately it's not working.
    In the Region Header:
    <script language="JavaScript" type="text/javascript">
    <!--
    function pull_multi_value(pValue){
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=getCostCenter',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM',pValue)
    alert(pValue);
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM','null')
    gReturn = get.get('XML');
    if(gReturn){
    for(var i = 0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByid("id");
    --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 == 'hideMe508'[i]){--I changed the class name[/i] l_El.parentNode.innerHTML = l_Value;
    l_El.parentNode.id = l_ID;
    }else{
    l_El.innerHTML = l_Value;
    get = null;
    //-->
    </script>
    ON Demand Process -
    DECLARE
    v_var VARCHAR2 (15);
    v_yr VARCHAR2 (15);
    v_obj VARCHAR2 (15);
    v_acc VARCHAR2 (15);
    v_dept varchar2(10);
    CURSOR cur_c
    IS
    select variable, year, object_code,accumulation_code, dept_accum FROM cost_center_code
    WHERE costcenterid= (v('TEMPORARY_APPLICATION_ITEM'));
    BEGIN
    FOR c IN cur_c
    LOOP
    v_var := c.variable;
    v_yr := c.year;
    v_obj := c.object_code;
    v_acc := c.accumulation_code;
    v_dept := c.dept_accum;
    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_0001">' || v_var || '</item>'[i]);--I changed these to reference the fields within the report HTP.prn ('<item id="f05_0001">' || v_yr || '</item>');
    HTP.prn ('<item id="f06_0001">' || v_obj || '</item>');
    HTP.prn ('<item id="f07_0001">' || v_acc || '</item>');
    HTP.prn ('<item id="f08_0001">' || v_dept || '</item>');
    HTP.prn ('</body>');
    EXCEPTION
    WHEN OTHERS
    THEN
    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">' || SQLERRM || '</item>');
    HTP.prn ('</body>');
    END;
    Any help will be greatly appreciated
    Moe

Maybe you are looking for

  • If you take it out of the shop ..you are on your own buddy

    sorry if this is posted in the wrong place..? I am about to buy my first ever Apple Mac ( iMac ) when the current freezing / screen problems have been resolved as a total newbie to the world of Mac's , I would like to walk into the Apple Store, and b

  • I tunes purchased songs can't be played on my mini

    I've purchased songs from the itunes store. My mini no longer allows me to play them. I can only hear them when the I listen to my itunes library.

  • Message GLT2201 'Balancing Field Profit center in line item 2 not filled'

    I am getting this error message whenever I try to charge of the over payment back to the same customer account using posting key 15 (assuming the customer is paying 150 for 100 invoice, I am trying to charge off the 50 to the customer by clicking on

  • TV out help

    Hello, please, I have a big problem with the tv out. I have my screen but in black&white :( thanks to anyone who can describe me in every step how to have my Mega180 on my tv (pal). what I have to modify in bios ? if someone can take screenshot it wi

  • Https / SSL needed for my website

    I hope someone can help me. I have a website http://www.to-shea.com I purchased a SSL package from register.com (they host my site too). They told me "anyone who sees my site would see the https prefix. I received an email from them stating that they