Dynamic action on LOV using tabular form

Hello,
I realize this has likely been dealt with somewhere already, but I'm going to ask anyway.
I have a master/detail form. The detail form has an option to add rows. I have created a dynamic action as defined below...
True Action:
Sequence: 10
Action: Javascript Expression
Fire On Page Load: No
Code: $(this.triggeringElement ).val()
Sequence: 20
Action: SQL Statement
Fire On Page Load: No
Code: select travel_status from territories_summary_v where territory_code=:P3_FIND_COUNTRY_CODE and language='US';
Sequence: 30
Action: Javascript Expression
Fire On Page Load: No
Code: $(this.triggeringElement).closest("tr").find("td[headers='TRAVEL_STATUS_CODE'] input").val($v('P3_FIND_COLOR'));
The P3_FIND_COLOR and P3_FIND_COUNTRY_CODE are defined as hidden fields.
This DA seems to partially work. It will update the travel status code with the proper value for each line. I can see it on screen. But when I apply changes it doesn't save this particular value to the database. If I physically go to the field and type something in, it will save this field. All other values save ok... just not this column .. regardless of the number of detail lines.
Further to this, when I add a row and a new blank row appears, if I change the country, the DA does not fire at all. I've put an alert in on sequence 10 and the alert will fire for a pre-existing row in the table... but not a new row. I would have thought that because it's an onChange DA associated with the country code, it would work for each new row regardless of how many rows are added or whether its a new row vs existing row.
So the first issue is why it won't save the data that is populated in travel status code when I can clearly see it there? Secondly, why this DA is not firing when I add a new row?
If anyone can help me it would be appreciated. I've done a lot of searches but have not come up with much where these issues are concerned.

There is no way to make a good guess on this without an example. It is hard to say what the reason could be.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
https://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
-------------------------------------------------------------------

Similar Messages

  • PopUp LOVs in tabular forms

    Hi,
    I've discovered a problem using Popup LOVs in tabular forms, whereby on selecting a value from the LOV the key value is displayed on the form instead of the display value.
    Having searched this forum it would appear I'm not the only one who has encountered this problem, but I've had no luck in finding an explanation for this behaviour or a solution / workaround.
    Can anyone help?
    Thanks
    Andrew.

    A Popup LOV is just a normal Input field with the option to popup another window, select a value and return that value to the field. On the popup window, the "display" value is shown to the user to make it easier to select the right value, but the "return" value is returned to the field as this is the value that needs to be stored on the database.
    As a normal input field, it can only hold and, therefore, display one value.
    Select Lists, on the other hand, store the "return" value but show the "display" value because that is how Select Lists are designed to operate.
    You can show the "display" value in a second field for data that is already on the database by using the "Display as Text (based on LOV, does not save state)", based on the same database column as for the Popup LOV field and using the same LOV table.
    However, the only way to get a "display" value for a new/edited record would be to either submit the page or design your own popup which can pass values back into two fields. Either way, you need two fields.
    Unless someone else has found a way around this?????
    Regards
    Andy

  • Dynamic LOV FOR TABULAR FORM 6i

    Hi,
    I have tabular form of two Items(ID,DESC) and I want to Populate LOV for item(ID) every record
    and record_Group & SQL statments are stored in DB.
    ACTION: when query in POST-QUERY Trigger get for every record in tabular form -- the stored SQL-Statment from table then put it into dynamic record_group and populate the dynamic LOV.
    Please advice,
    Thanks in Advance.

    OK daniel
    This form used for get reports
    then header get the name of Report (Table-A) (report_ID),(report_desc).
    then details for get the Parameters will send to report builder (Table-B) (detail_id),(report_id),(sql_stm).
    so parameters may be need for example stock code so this record need to query from stocks table to get stock code and stock name.
    next record for item Code so need to query from Items table to get the Item code and Item name
    another report for employees so the user enter report code then when query and get in details block employee code and employee name.
    so the lov will check if this record have query sql-statment or not if have execute it in the record_group then in lov
    then go to the next record if sql_stm is null then no lov in this record and so on.
    thanks..

  • Dynamic Lov in Tabular form

    Hi,
    I'm creating select lists in tabular forms
    and 2 select lists in it.
    I'd like to use 1st list as a filter of 2nd list dynamically.
    How can I do that?
    Please advise me.
    I found one tips(http://htmldb.oracle.com/pls/otn/f?p=18326:54:10017106699293281168::::P54_ID:1282) and I tried to do it but it didnt work...
    Thanks

    Hi,
    There's several postings in the forum on how to do this, so if this message doesn't make sense, search the forum some, maybe for my Name?
    If I remember correctly, using the following as an example, to something similar. This is based on a country and state lookup.
    field 1 (:P1_country):
    select distinct country from lu_location;
    field 2 (:P1_state):
    select distinct state from lu_location
    where country = :P1_country;
    Make :P1_country a 'Select List with Submit', and it 'should' work. I'm at home, so I don't have access to my database.
    Bill Ferguson

  • Using LOV on Tabular form

    I want to use Select list in tabular form. I have to columns. 2nd select list would depend on valuse of 1 select list. I knkw how to do it in simple form but I don't know how to do it in tabular form. Please advise

    Are you asking for a "Select List with Submit" on the first column and a simple "Select List" on the second column? If so, you can't have a "Select List with Submit" on a Tabuar Form.

  • How to dynamically change the column in tabular form

    Hi!
    Is there any way to show notice in tabular form if value entered is not in some range?
    eg. I click on button add row, and then I fill out values and if one value is not within a certain range then in last column (this column is not included in table) is notice out of range or something else. I know that this can be achieved with validations but this must be just notice, not some restriction. Values I wrote must be inserted into table.
    I hope you understand me. I use Apex 4.1 and 11g Oracle database.
    Regards,
    drama9346

    Sure you can. If you edit your page attributes you have a field javascript on load. Here you can enter code that does checks or actions depending of user events. Example in the case of a tabular form:
    $('input[name=f01]').live('change', function(){
    if($(this).val()=='1'){
    alert('value is 1');}
    This will give an alert if you change the item in the first column to 1.
    More about jQuery & events at
    http://api.jquery.com/category/events/

  • Theme 23 does not display popup LOV in tabular form

    I created new application using new Theme 23. In tabular form the popup LOV button does not show. While using this theme the column LOV button is soooooo small it is not visible. If I move the cursor on the side of the field eventually I cursor handle will change and I can click and popup LOV will show. When I switch to an older theme (e.g. 21) the LOV button shows just fine.
    Does anyone can offer a solution? Can I expect more this type of problems in the new theme 23?

    I examined exported application file. Indeed the problem is p_column_id parameter. It should be decimal number for translated application. Characters %2C in p_column_id value stands for comma. It should be dot instead. Parameter value should be p_column_id=30289208519476123679.915121.

  • Dynamic no of rows in tabular form

    Dear oracle forms experts,
    hope you all will be doing fine.
    Is it possable to that a tabular form take dynamic no of rows at run time, i mean if we i query mode if data contains 20 rows then it should expand to 20 rows and if it is only 5 rown then it should expand to 5 rown. and if i do not want to use side bar as well.
    Regards
    Abbas

    OK and thanks you too.
    now if i take it in this way that i have defied a tabular form for let say 20 rows and now in query mode if there are only 5 records then my form shuold show only first 5 rows that have data and rest 15 should get hidden..
    so now can it be possable in forms Developer 10g.
    Kind Regards
    Abbas

  • LOV in tabular form-Apex 4.0

    Hi
    I am creating a wizard based tabular form in Apex 4.0 and my scenario is like
    I have a deptno column in my form and i want the employees for that particular dept in the ename select list.
    I know that it can be done with manual tabular form. But since i am using a wizard based tabular form, is it possible for achieving this scenario.
    Thanks.
    Divya

    Hi Vee,
    I have tried your solution. I have replaced the column in my SQL with the apex_item version of the LOV. For showing the column correctly in the Grid I have to set the column to a "standard report column".
    But Now it is now the edit flag is gone and it is not a updatable column anymore. When I push the Add button I cannot insert a value for the column.
    How can I define the column as editable so the standard procedures for updating and inserting the column are working again.
    Regards,
    Fred.

  • Dynamic action on checkbox using jQuery selectors

    Aim: Have a classic report with a checkbox for each record that fires a dynamic action. I'd like to source the relevant ID/value within Javascript (ultimately PL/SQL)
    Consider a classic report using the following query
    SELECT label
    ,apex_item.checkbox
      (p_idx   => 15 -- f42
      ,p_value => id
      ,p_attributes => 'id="f15_'||id||'" class="xyz"'
      ) chk
    FROM   my_tableDefine a dynamic action with
    Event: Click
    Selection type: jQuery selector
    jQuery selector: .xyz
    No condition
    Scope:Bind
    I have an action executing javascript
    var me = this.triggeringElement;
    console.log('me:'||me);
    console.log('name:'||me.attr('name') );
    console.log('id:'||me.attr('id') );
    console.log('value:'||me.prop('val'));Affected elements Selection type: Triggering element
    When I run the page and check a box, the DA fires, but all output shown in the console log is blank.
    I've tried copious variations to get this right, such as using $(this.triggeringElement)
    These pages make me feel confident I have the syntax right
    http://stackoverflow.com/questions/12038392/oracle-apex-checkbox-to-manipulate-other-values-when-checked-unchecked
    http://iadviseblog.wordpress.com/2011/08/24/get-triggering-element-in-da/
    But my values are still null?! Anyone know what I've missed?
    Apex 4.1.1
    Scott

    var me = this.triggeringElement;
    console.log('me:'||me);
    console.log('name:'||me.attr('name') );
    console.log('id:'||me.attr('id') );
    console.log('value:'||me.prop('val'));<ul>
    <li>Concatenation in javascript is with +* and not *||* (which means OR)</li>
    <li>Also, this.triggeringElement is a reference to the DOM element, it is not a jQuery object. So wrapping it in $() is required when you wish to access properties through jQuery.</li>
    <li>.prop('val') won't work. You need to check for the existence of a property-line attribute, which in case of a checkbox could be "checked".</li>
    <li>dynamic action on a report: use scope Live to prevent functionality from working when the report is refreshed/paginated</li>
    </ul>
    var me = $(this.triggeringElement);
    console.log('me:'+me);
    console.log('name:'+me.attr('name') );
    console.log('id:'+me.attr('id') );
    console.log('value:'+me.prop('checked'));

  • 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

  • Using tabular form wizard

    I created a tabular form using the Tabular Form Wizard. It works fine. Then, I added a region to this. The source of the region is an SQL Query. For some reason the new region does not display on the page when the page is run.
    However, when I create the same region with the same SQL source on another page, it displays fine.
    Why would this be?
    Thanks.

    "420716"
    Are you sure you created the SQL query region on the same page? Check the page definition to see if it's actually there. How did you go about doing this, where did you click, etc? If you have this running on htmldb.oracle.com and give us the details, we can have a look.
    Sergio

  • Dependent LOV in Tabular Form

    All,
    We are developing an application where we come across requirement to have two fields in tabular form and both are required to have LOV. But the issue is the second field LOV in the tabular form is dependent on first field value.
    ex: Assume first field is "Country" and second field is "Cities", when user selects first field country as "US", then we have to populate list of citiies in "US" for that row. And if the user selects country as "UK" for the second row, we have to populate second field (city) with list of citieis in "UK".
    We are unable to achieve this functionality and any help/pointers would be highly appreciated.
    Ram

    Hi Ram,
    Please have a look at this example by Denes Kubicek
    [http://apex.oracle.com/pls/otn/f?p=31517:176|http://apex.oracle.com/pls/otn/f?p=31517:176]
    I was able to achieve the cascading LOV functionality based on the above example.
    Thanks,
    Dippy

  • Inserting dynamic images to excel using oracle forms 6i

    HI All,
       I'm working in project to export data from a table, one of the column has images (Blob). I need to export the data to excel.
       How can I do it?
    Thanks

    Use OLE Functions.
    http://codingwithpassion.blogspot.com/2011/02/plsql-forms-word-and-excel-manipulation.html
    Features of OraOLEDB
    ole - Oracle Forms using OLE2 not saving Excel document on 3-tier setup - Stack Overflow
    Tx

  • Need help in completing Denes Kubicek code: cascading lov in tabular form

    Hi, I have been working off of Denes Kubicek demo for cascading lovs and have finally (!) gotten it working....sort of.
    Denes's instructions indicate that you must request an account in order to receive the code. I have done so, but have not had a response....can anyone help me on what needs to be done in oder to complete his instructions?
    thanks!!
    here is his helpful code:
    http://htmldb.oracle.com/pls/otn/f?p=31517:176:2537143614094776

    sorry. my query is now:
    select
    apex_item.hidden(11,seq_id) seq,
    apex_item.hidden (12,seq_id)||
    apex_item.select_list_from_query_XL(13,c013,'select distinct s.common_name d, s.species_itis r
    from species s, species_qc c
    where partner_id = '||:f200_issuing_agency||' and
    c.species_itis = s.species_itis order by s.common_name',
    'style="width:220px" '
    || 'onchange="f_set_casc_sel_list_item(this,'
    || 'f16_'
    || LPAD (seq_id, 4, '0')
    || ')"',
    'YES',
    '0',
    '- Select Species -',
    'f13_' || LPAD (seq_id,4, '0'),
    NULL,
    'NO'
    ) SPECIES_ITIS,
    apex_item.select_list_from_query(14,c014,'select disposition_desc d, disposition_code r
    from dispositions
    where displayed = 1 order by disposition_desc') DISPOSITION_CODE,
    apex_item.text(15,c015) reported_quantity,
    apex_item.select_list_from_query(16,c016,'SELECT DISTINCT unit_desc ,unit_of_measure
    FROM species_Qc s, units_of_measure u
    WHERE s.unit_of_measure = u.unit_measure
    AND species_itis = '||c013||'AND partner_id = '||:F200_ISSUING_AGENCY,
    'style="width:220px"',
    'YES',
    '0',
    '- Select Unit -',
    'f13_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO' ) UNIT_MEASURE,
    apex_item.SELECT_LIST_FROM_LOV(17,c017,'SALE_DISPOSITION') SALE_DISPOSITION_FLAG,
    apex_item.text(18,c018) PRICE,
    apex_item.text(19,c019) PERMIT_ID,
    apex_item.select_list_from_query(20,c020,'select market_desc d, market_code r
    FROM market_categories
    where market_code in (select distinct market_code
    from species_qc
    where species_itis = '||c013||'
    and partner_id = '||:F200_ISSUING_AGENCY||')',
    'style="width:220px"',
    'YES',
    '0',
    '- Select Market -',
    'f13_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO' ) MARKET_CODE,
    apex_item.text(21,c021) GRADE_CODE,
    apex_item.text(22,c022) trip_id
    from apex_collections c
    where collection_name = 'CATCH_C' and
    c.c022 = :F200_CURRENT_TRIP_ID
    UNION ALL
    select
    apex_item.hidden(11,null) seq,
    apex_item.hidden (12,null)||
    apex_item.select_list_from_query_XL(13,0,'select distinct s.common_name d, s.species_itis r
    from species s, species_qc c
    where partner_id = '||:f200_issuing_agency||' and
    c.species_itis = s.species_itis order by s.common_name',
    'style="width:220px" '
    || 'onchange="f_set_casc_sel_list_item(this,'
    || 'f16_'
    || LPAD (9900 + LEVEL, 4, '0')
    || ')"',
    'YES',
    '0',
    '- Select Species -',
    'f13_' || LPAD (9900 + LEVEL,4, '0'),
    NULL,
    'NO'
    ) SPECIES_ITIS,
    apex_item.select_list_from_query(14,null,'select disposition_desc d, disposition_code r
    from dispositions
    where displayed = 1 order by disposition_desc') DISPOSITION_CODE,
    apex_item.text(15,null) reported_quantity,
    apex_item.select_list_from_query(16,null,'SELECT DISTINCT unit_desc ,unit_of_measure
    FROM species_Qc s, units_of_measure u
    WHERE s.unit_of_measure = u.unit_measure
    AND species_itis = '||0||'AND partner_id = '||:F200_ISSUING_AGENCY,
    'style="width:220px"',
    'YES',
    '0',
    '- Select Unit -',
    'f13_' || LPAD (9900 + LEVEL, 4, '0'),
    NULL,
    'NO' ) UNIT_MEASURE,
    apex_item.SELECT_LIST_FROM_LOV(17,null,'SALE_DISPOSITION') SALE_DISPOSITION_FLAG,
    apex_item.text(18,null) PRICE,
    apex_item.text(19,null) PERMIT_ID,
    apex_item.select_list_from_query(20,null,'select market_desc d, market_code r
    FROM market_categories
    where market_code in (select distinct market_code
    from species_qc
    where species_itis = '||0||'
    and partner_id = '||:F200_ISSUING_AGENCY||')',
    'style="width:220px"',
    'YES',
    '0',
    '- Select Market -',
    'f13_' || LPAD (9900 + LEVEL, 4, '0'),
    NULL,
    'NO' ) MARKET_CODE,
    apex_item.text(21,null) GRADE_CODE,
    apex_item.text(22,null) trip_id
    FROM DUAL
    WHERE :request = 'ADD'
    CONNECT BY LEVEL = 2
    I have two issues:
    1. the item tab_cascading_item is not populated when the value of c013 (species) is changed.
    2. I receive an error when trying to add a row to the collection. My code for doing so is:
    begin
    for i in 1..1 LOOP
    apex_collection.add_member (p_collection_name => 'CATCH_C',
    p_c013 => null,
    p_c014 => null,
    p_c015 => null,
    p_c016 => null,
    p_c017 => null,
    p_c018 => null,
    p_c019 => null,
    p_c020 => null,
    p_c021 => null,
    p_c022 => :F200_CURRENT_TRIP_ID );
    end loop;
    end;
    I am so close on getting this....any help would be appreciated.

Maybe you are looking for