DYNAMIC ACTION - Javascript Expression checkbox

Hello
I have 2 items
1.     P2_REQUEST_TYPE_CODE
a.     SELECT LIST
i.     EQUIPMENT REV
ii.     POSTER
iii.     ROOM SHELL
iv.     VISIO TO CAD
2.     P2_RETURNED_FILE_TYPE_CODE
a.     CHECKBOX
i.     2D POSTER
ii.     CAD DRAWING
iii.     PDF
iv.     VISIO
I Have a Dynamic Action
Event: Change
Selection Type : Item(s)
Item(s): P2_RETURNED_FILE_TYPE_CODE,P2_REQUEST_TYPE_CODE
Condition: JavsScript Expression
Value:
$v('P2_RETURNED_FILE_TYPE_CODE')=='2D POSTER'||
$v('P2_REQUEST_TYPE_CODE')=='POSTER'
When my user chooses “P2_REQUEST_TYPE_CODE (“POSTER” )”it needs to displays Address Columns and it does. When my user chooses “P2_RETURNED_FILE_TYPE_CODE (“2D POSTER”)” It needs to display address Columns and it does. Everything works fine except when in “P2_RETURNED_FILE_TYPE_CODE” all checkboxes are checked the address columns don’t get display, any idea?
Application Express 4.1.1.00.23
Thanks
-JC

Hi JC,
If you check multiply checkboxes the value will be a string with the value separated by a colon.
You shoudl use something like indexOf.
$v('P2_RETURNED_FILE_TYPE_CODE')=='2D POSTER'||
$v('P2_REQUEST_TYPE_CODE').indexOf('POSTER') != -1Regards,
Kees Vlek
http://www.orcado.nl
http://www.orcado.nl/blog/blogger/listings/69-kvlek
If the question is answered please change it to answered.

Similar Messages

  • Executing dynamic action JS then plsql code with checkbox.

    All,
    I have a checkbox which when clicked i want to run javascript expression then next plsql code in that sequence. But iam getting the first issue here when i put in JS an expression like document.getElementById("P111_CHECK1").value ... or even document.getElementById("P111_CHECK1").checked i always get undefined error. So how can i determine if the checkbox is checked or unchecked in DA? thanks in advance.

    Hi,
    still stuck here on how do i check/uncheck a single checkbox in Apex i tried via dynamic action JS expression like this but doesnt work ==> document.getElementById("P111_CHECKBOX1").checked = true/false; Any help on this pls?

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

  • Dynamic action - Cache server data

    APEX 4.2.2
    Is there a way to cache server side data in a global (page/document level) Javascript vector (bunch of key-value pairs) (associative array, array of objects or some such)? This way the data can be used by subsequent dynamic actions' Javascript code without querying the server over and over.
    I see that apex_util.json_from_sql is still undocumented after all these years. Are there any examples of using that API to do this sort of thing? Can someone please share?
    Thanks

    https://apex.oracle.com/pls/apex/f?p=57688:24
    I took a shot at this and it seems to work well using Javascript global objects for data storage. Hope this helps someone.
    1. Page attributes - Javascript global variables var gData,gLookup={};2. On-demand application process Get_Emps as apex_util.json_from_sql('select empno,ename from emp');3. Page Load dynamic action to invoke the application process and cache the data var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=Get_Emps',$v('pFlowStepId'));
    var retval=get.get();get=null;
    gData=apex.jQuery.parseJSON(retval);
    $.each(gData.row,function(i,obj){
       gLookup[obj.EMPNO]=obj.ENAME;
    });4. EMPNO page item - Standard OnChange dynamic action to SetValue of ENAME page item using the cached data - Javascript expression gLookup[$v(this.triggeringElement)]
    We document something when it is ready to be supported. This specific procedure isn't something we haven't invested in, and thus, per our discretion, have elected not to document or support it at this time.Fair enough.

  • Set checkbox session state using Jquery / dynamic action

    Hello Folks,
    I'm trying a simple dynamic action to disable & set element value upon making a radio box selection.
    What I'd like is:
    a) if i chose "Vendor" as "Traditional" (default value) I would like to set the "SNAP" flag as Checked and "Status" textbox to "test for static value" (SNAP flag is not set, only works on Page load)
    b) if i chose "vendor" as "Isilon" then "SNAP" flag should be greyed out (disabled) and "Status" textbox should be disabled. (Working as Expected)
    Link to the page:
    http://apex.oracle.com/pls/apex/f?p=73069:6:0::NO:::
    Workspace: wksp_chandu
    Username: test
    Password:test
    Dynamic Action
    Identification
    Page:
    6. Check Disable radio
    *Name(Value Required)
    *Sequence(Value Required)
    When
    *Event(Value Required)
    - Select Event -
    Change
    Click
    Double Click
    Get Focus
    Key Down
    Key Press
    Key Release
    Lose Focus
    Mouse Button Press
    Mouse Button Release
    Mouse Enter
    Mouse Leave
    Mouse Move  Page Load
    Page Unload
    Resize
    Resource Load
    Scroll   Select          
    After Refresh
    Before Page Submit
    Before Refresh
    Change Order [Shuttle]
    Custom
    Show unsupported...
    *Selection Type(Value Required)
    - Select Selection Type -
    Item(s)
    Button
    Region
    DOM Object
    jQuery Selector
    *Item(s)(Value Required)
    Condition
    - No Condition -
    equal to
    not equal to
    greater than
    greater than or equal to
    less than
    less than or equal to
    is null
    is not null
    in list
    not in list
    JavaScript expression
    *Value(Value Required)
    True Actions
    The following actions will be fired when the 'When' condition is met, or when it is 'No Condition'.
    Edit
    Sequence
    Action
    Fire On Page Load
    Selection Type
    Affected Elements
    10
    Clear
    Yes
    Item(s)
    P6_SNAP
    P6_STATUS
    20
    Disable
    Yes
    Item(s)
    P6_SNAP
    P6_STATUS
    Add True Action
    False Actions
    The following actions will be fired when the 'When' condition is not met.
    Edit
    Sequence
    Action
    Fire On Page Load
    Selection Type
    Affected Elements
    10
    Enable
    Yes
    Item(s)
    P6_SNAP
    P6_STATUS
    30
    Set Value
    Yes
    Item(s)
    P6_STATUS
    40
    Execute JavaScript Code
    No
    Item(s)
    P6_SNAP
    Add False Action
    Thanks!
    Chandu

    Oops...I just got it working.. Thanks for your time. I was trying to set checkbox value via javascript code and somehow that wasn't working...Finally changed the setvalue to be based on "PL SQL expression" nvl(:P6_SNAP,1)...that seem to have worked.
    Thanks again !

  • 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'));

  • Execute javascript from plsql in a dynamic action.

    Is it possible to execute javascript with htp.p from a plsql block in a dynamic action (on change).
    I have tried it but I get a JSON error.
    The reason I want to to this is:
    I have to check something with plsql and depending on the result I want to do something in javascript.
    I now going to try it with ajax from javascript, but if somebody has a other way to do this i like to hear it.
    Thanks,
    Fred.

    Very neat, many thanks.
    I now have a 'Set Value' 'Javascript Expression' action of 'this.triggeringElement.id;' to set a hidden *but unprotected* page item. This is followed by the 'Execute PL/SQL' action which simply calls a package procedure and passes the name of the triggering item. The procedure then sets the session state(s) as required.
    Thank you!

  • Dynamic Action Set Value - PLSQL Error - cannot contain an expression

    I am trying to use below in a Dynamic Action to Set Value with PL/SQL Function. The dynamic action does not update the item appropriately. I tried to run the below directly in SQL Workshop but received the error "PLS-00372: In a procedure, RETURN statement cannot contain an expression". How can I get below to return the value needed?
    DECLARE
    rqstdaloe number;
    rqstdeloe number;
    devpercent number;
    rqsttarget date;
    timeleft number;
    PSPTime number;
    DevTime number;
    DevPer number;
    BEGIN
    SELECT SUM("TRACK_TIME_SPENT") INTO rqstdaloe
    FROM "TIME_TRACKER"
    LEFT JOIN "TBL_R66_TASK_TYPE" ON "TASK_TYPE_ID" = "TRACK_TYPE"
    WHERE "TRACK_REQUEST_ID" = :P2_REQUEST_ID AND "TASK_TYPE_TYPE" = 'DEV';
    rqstdeloe := :P2_REQUEST_ELOE;
    SELECT SUM(TT1."TRACK_TIME_SPENT") INTO DevTime
    FROM "TIME_TRACKER" TT1
    LEFT JOIN "TBL_R66_TASK_TYPE" TT2 ON TT1."TRACK_TYPE" = TT2."TASK_TYPE_ID"
    WHERE TT1."TRACK_USER" = :P2_PSP_ASSIGNED_PRIMARY AND TT2."TASK_TYPE_TYPE" = 'DEV';
    SELECT SUM(TT1."TRACK_TIME_SPENT") INTO PSPTime
    FROM "TIME_TRACKER" TT1
    WHERE TT1."TRACK_USER" = :P2_PSP_ASSIGNED_PRIMARY;
    DevPer := ROUND(DevTime/PSPTime,2)*8;
    timeleft := TRUNC(((NVL(rqstdeloe,0) - NVL(rqstdaloe,0))/DevPer)+.99999,0);
    rqsttarget := to_date(sysdate,'mm/dd/yyyy') + timeleft;
    RETURN rqsttarget;
    END;

    Hi Dave,
    just a quick hint. If you just want to have the time part of a date/sysdate, you can use TRUNC to do that. So your existing code
    rqsttarget := to_date(sysdate,'mm/dd/yyyy') + timeleft;could be changed to
    rqsttarget := trunc(sysdate) + timeleft;If you perform a TO_DATE on a date variable, the PL/SQL engine will first convert that date variable with an implicit type conversion to a VARCHAR2, because the TO_DATE interface only supports VARCHAR2's and NUMBER's.
    But implicit type conversions are always dangerous, because if your default date format mask isn't mm/dd/yyyy your TO_DATE will fail.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Fire javascript first and then dynamic action

    Hi,
    I am using Oracle Apex 4.1.
    In one of my reports data fields, there are few fields with hyperlinks.
    Ex: I have report and one of the field states "Enter Code", so when the user clicks "Enter Codes" URL it fires a javascript which sets specific value to the hidden item and opens a modal form to enter the codes.
    So when the form opens, if there are any values for the codes, I need to show the codes in the form and I want to write a dynamic action which sets the values after the form opens.
    So my requirement is:
    On Click of a link, Call javascript defined on the page and then make a dynamic action call.
    I need to call javascript from the url as I need to set some parameters passed from the javascript.

    Hi,
    I found something, that would be interesting to fire dynamic actions from javascript.
    But make sure you don't change the order of the dynamic actions.
    Make a call to this from your javascript code
    apex.da.actions($("#P5_HID_TEST"),apex.da.gEventList[1],"change",null);
    actions : function(pSelector, pEvent, pBrowserEvent, pData)

  • Dynamic-actions/expressions for Radio button in VC

    Hi,
    I would like to know whether dynamic actions for radio-buttons are possible in VC??
    I have a situation where, i have to display/hide an input-field according to the radio-button that i select.
    Is this possible in VC??
    Because, i do not find any place where i can write expressions for a radio-button so that it can take actions accordingly.

    Actually its possible.
    Here is the sample code for this.
    tables : kna1.
    parameters : chk1 radiobutton group g1 user-command abc,
                 chk2 radiobutton group g1.
    parameters : chk3 type kunnr.
    at selection-screen output.
    loop at screen.
      if chk1 = 'x' and screen-name = chk3.
          chk3-active = '0'.
      endif.
    endloop.
    In this way you can hide a input-field on the screen.

  • Help using a dynamic action to update tabular form items (specifically radio button) based on collection

    Hi Everyone, I have posted this question in the past and made huge progress with Denes Kubicek's help:  https://apex.oracle.com/pls/apex/f?p=31517:294:115851992029365::::: based on my earlier question posted: https://forums.oracle.com/forums/thread.jspa?threadID=2537494
    I am struggling with one item in my tabular form.  It is a radio button.  The choices all appear properly, but the value is not saved in the collection (and hence, not saved in the table).  All other items in the tabular form save properly.
    here is what I have for the query.   It is item c024 (which maps to ;'f03'), which is defined as a radio LOV based on an existing LOV.
    Currently I have:
    2 page items:
    P110_ID
    P110_VALUE
    Dynamic action called CHANGE COLUMN:
    event: CHANGE
    selection type: jQUERY Selector
    jQuery:
    jQuery Select = input[name='f03'],select[name'f08'],select[name='f09'],input[name='f10'],input[name='f11'],input[name='f12'],select[name='f40'],input[name='f21'],input[name='f22'],input[name='f23'],input[name='f50']
    event scope: Dynamic
    true action#1: set value P110_ID javascript expression this.triggeringElement.id
    true action#2: set value P110_VALUE javascript expression this.triggeringElement.value
    true action#3: execute pl/sql code
    declare
      v_member number;
      v_seq number;
    begin
      v_member := TO_NUMBER (SUBSTR (:p110_id, 2, 2));
      select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
      safis_collections.update_column(v_seq,
                                    v_member,
                                    :p110_value);
    true ation#4 refresh region :LANDINGS_COLLECTION
    the tabular form is based on the query:
    SELECT
    apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
    seq_id,
    seq_id display_seq_id,
    apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
    apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0','  -- Select Favorite --  ','f08_'||seq_id,'') Disposition,
    apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear,
    apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
    apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
    apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
    ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars,
    decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished,
    decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY,
    decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT,
    c024 hms_flag,
    decode(c050,'Y',apex_item.checkbox(21,'Y','id="f21_'||seq_id||'" style="background-color:#FBEC5D; " onClick="alterYes('||seq_id||');" onKeyPress="alterYes('||seq_id||');"',c021),'N','N/A') FinsAttached,
    decode(c050,'Y',apex_item.checkbox(22,'N','id="f22_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterNo('||seq_id||');" onKeyPress="alterNo('||seq_id||');"',c022),'N','N/A') FinsNotAttached,
    decode(c050,'Y',apex_item.checkbox(23,'U','id="f23_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterUnk('||seq_id||');" onKeyPress="alterUnk('||seq_id||');"',c023),'N','N/A') FinsUnknown,
    decode(c050,'Y',apex_item.textarea(28,c028,3,null,null,'f28_'||seq_id,''),'N','N/A') Explanation,
    decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale,
    decode(c020,'Y',
    apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;"',null,null,null,'f40_'||seq_id,''),
    'N','N/A') HMS_AREA_CODE,
    c020,c050,
    decode(c020,'Y',
    apex_item.text(41,TO_NUMBER(c041),5,null,null,'f41_'||seq_id,''),
    'N','N/A') Sale_Price
    from apex_collections
    where collection_name = 'SPECIES_COLLECTION' order by seq_id
    I have noticed the following:
    when I change column C011 (price) the following values are set in the dynamic action:
    P110_ID = f11_1
    P110_VALUE = whatever I change the price to.
    when I change the column C024 (hms_flag), the following values are set:
    P110_ID = f03_0001
    P110_VALUE = whatever I change hms_flag to.
    the region is refreshed in my dynamic action, and the change for hms_flag does not hold.  I have tested the SQL query that generates the value for v_SEQ in the dynamic action.   In both a change to price and HMS_FLAG it appears valid
    select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
    if f11_1, v_seq:= 1
    if f03_0001, v_seq := 1
    thank you!

    solved.  sort of. 
    field c024 references f03.
    the Dynamic ACtion, step 4 calculates v_member by taking a substring of P110_ID...and in all other fields, the column and the field (fxx) are the same value....except for c024.
    I am not certain exactly how to resolve, but see the problem.

  • Dynamic action on show region

    Hi,
    Application Express 4.1.0.00.32
    I have a report region on a page that is conditionaly displayed based on the value of a page item Pn_ITEM = 'HIDE'.
    I have dynamic actions that run on the page that populate a collection and refresh the report without the need to submit the page. However I need to somehow show the report when the collection has at least one member present.
    I have tried the following:
    1st true action executes pl/sql that adds a record / member to a collection, then a 2nd action sets the value to a page item Pn_ITEM = 'SHOW' and a 3rd true action that should show the region based on the set value from true action 2.
    My collection has a member added. The value 'SHOW' is applied to my page item Pn_ITEM by the dynamic action however the report region that I now want displayed is not showing. Obviously if the page is submitted the report will now be shown however I cannot submit the page at this point thats why I need to do this dynamicaly or through javascript and on demand processes.
    Any ideas how to get my report region to display once the collection has at least one member without submitting the page?
    Thanks in advance.

    Remove the condition for display from the region. You don't want to have this here since it will completely stop the region from rendering if the condition is not fullfilled at rendering time. You want it rendered, just not displayed.
    Add css to the region (inline, class):
    style="display: none;"Add a true action which will do a refresh on your region (Component - Refresh, select your report region as an affected element).
    Now either:
    Add a true action of type execute javascript. Since you can't put conditions on true actions, we'll test the condition in javascript.
    Pick one:
    if($v("Pn_ITEM")=='SHOW'){
    //if you want to target the region to be shown by an ID (static id?)
    $("#region_id").show();
    if($v("Pn_ITEM")=='SHOW'){
    //if the triggering element would be the region to be shown
    $(this.triggeringElement).show();
    if($v("Pn_ITEM")=='SHOW'){
    //if you'd want multiple affected elements to be shown at once drop the [0]
    $(this.affectedElements[0]).show();
    };Create a new dynamic action which has the same triggering conditions as your other dynamic action.
    Specify a when condition:
    $v("Pn_ITEM")=='SHOW'Create one true action of the type 'Show' to show the region.
    End result should be your dynamic action creating an element in the collection, a refresh of the report based on the element (but still not shown), and finally a show of the region.
    Don't forget that the actions will also need fire on page load (so don't forget to check the checkbox on the true actions), otherwise the region will not be shown initially.
    I'd say that the item is probably not necessary anymore, but that depends on any other logic you might have on your page and possibly interacts with it.

  • Dynamic actions and tabular forms

    I'm trying to attach a dynamic action to a tabular form item, and it's not working the way I'm expecting it to. Since you can't attach dynamic actions to parts of a tabular form in the "normal" way that you can for page items, I'm using JQuery selectors to pick the parts to link to. For links (such as opening a pop-up window with more information about a row), this is working fine. But I'm really struggling to attach to a simple checkbox.
    On my tabular form, I've got a simple checkbox. I've tried putting text in the Element Attributes, Element Option Attributes, CSS Class, CSS Style, and HTML Expression fields, but none of them appear to be making it through to the source code of the generated page. Which means, I think, that I'm limited to using a jQuery Selector along the lines of "input[name=f07]", but creating a dynamic action on click or on change with that selector doesn't seem to ever fire.
    What am I missing?
    -David

    Ok, this is interesting. When I tried to mock this up on apex.oracle.com, I was able to make it work (though I had to change the selector to "input[name=f07_NOSUBMIT]", which means I'm going to have to walk the DOM to get the actual value...but I'm pretty sure I can handle that). After a bit of scratching my head, I eventually found that my pop-up dynamic action was somehow or other blocking the checkbox dynamic action from firing. Changing the sequence so that the checkbox DA happens first allows them both to fire.
    Here's the javascript from the pop-up DA (it's based on this post by Havard Kristiansen):
    /* prevent default behavior on click */
    var trgt = this.triggeringElement.href;
    var e = this.browserEvent;
    e.preventDefault();
    /* Trigger JQuery UI dialog */
    var horizontalPadding = 30;
    var verticalPadding = 30;
    $('<iframe id="modalDialog" src="' + trgt + '" />').dialog({
         title: "Item Details",
         autoOpen: true,
         width: 570,
         height: 400,
         modal: true,
         close: function(event, ui) {$(this).remove();},
         overlay: {
              opacity: 0.5,
              background: "black"}
    }).width(570 - horizontalPadding).height(400 - verticalPadding);
    return false;At this point, the checkbox DA's action is simply an alert box. Like I said, I'm not sure what's going on, but I'm at least able to move forward...
    -David

  • Dynamic Action with KeyCode check for ENTER button pressed

    Hi,
    I want to create a dynamic action which executes if the ENTER button of field P1_NAME is pressed.
    I thought about this type of DA:
    Event: Key Press
    Selection Type: Item(s)
    Item(s): P1_NAME
    Condition: Javascript expression
    Value: this.triggeringElement.keyCode == 13
    That unfortunately doesn't work! Dynamic action doesn't get executed...
    Hope for help! :)
    Tobias

    I found the solution in my own blog: :)
    Event: Key Press
    Selection Type: Item(s)
    Item(s): P1_NAME
    Condition: Javascript expression
    Value: this.browserEvent.keyCode == 13

  • Dynamic Action, validation check, on an Item, could not use Change event

    I am learning how to use Dynamic Actions in a 3.2.x app that was upgraded to 4.0.x. I wanted to share what I learned adding client side validation with these actions. Perhaps an Apex guru could suggest an easier method to use this feature.
    I have an existing function where a user selects multiple rows in a report page, and then assigns a single status and enters justification text for the selected rows in another page, then saves changes (via submit).
    One item, justification, is required. I replaced my JavaScript validation of an empty value, e.g., P10_JUSTIFICATION.value, with a dynamic action. The Change event was a candidate for this item, with the "is not null" Condition. However, it is possible to initiate this screen to review the status, overlook the justification text and immediately select a button to save changes. No Change event has fired. The Before Page Submit event was applicable here. This Event selection in the wizard does not provide the Item for definition and then the Condition wasn't the right context though available for selection. I selected JavaScript expression for the Condition, actually entered my original JS test expression, and created one True Action. The True action displays an Alert to tell the user that required text is missing.
    Test of this DA was not completely successful. The alert appeared but the page went on to submit anyway. I found I had to add another True Action, Cancel Event, to stop the submit. The DA was then successful.
    The Apex site examples, [http://st-curriculum.oracle.com/obe/db/apex/r40/apexdynactions/apexdynactions_ll.htm] , do a great job showing use of Change and Set Value events for Items but a user may not always navigate through items. These features were promoted for developers with no to little knowledge of JavaScript to use Apex for application development. This DA required using/understanding JS anyways.
    My next step is to implement actions on a tabular form that that has required values. It is disconcerting that I have read in the forum that the column value references such as f0x and its row number are required to get it all working (as a DOM or JQuery selector). I have already found that tabular form columns can be re-ordered from v3.2.1 to 4.0.x. I was hoping I could declare dynamic actions or simpler Javascript methods that would not rely on f0x array references.
    Thanks,
    Kelly

    It is disconcerting that I have read in the forum that the column value references such as f0x and its row number are required to get it all working (as a DOM or JQuery selector).Not necessarily. One possibility is to use descendent jQuery selectors to attach the dynamic action event handler by column heading:
    td[headers="HIREDATE"] input

Maybe you are looking for

  • App Store error message - Thai Store?!?

    When attempting to use the App Store I receive a message that the App I am attempting to download is not available from the Thai store - that I must switch to the US store. I have never switched to a Thai store. I first started getting this message w

  • No connection to iTunes store but no error

    I receive the following message when opening my iTunes- iTunes could not connect to the iTunes Store. The network connection timed out. Make sure your network settings are correct and your network connection is active, then try again. I am able to co

  • No Source List and No Tabs

    Both my iPod Classic and my iPod Shuffle show up as a device, and I am able to transfer music to them, but I have no source list - no summary page and no tabs. No icon representing my device with the serial number and name. I have tried several thing

  • HT1222 i have a 32-bit but need to download itunes for my iphone

    i hsvr s 32-bit and it says i need 64... how do i get that?

  • Error when Installing Oracle XE on Suse Linux 10.0

    I am installing Oracle xe on Suse Linux 10.0. I get following error. gthomas@linux:~/oraclexe> rpm -ivh oracle-xe-10.2.0.1-0.1.i386.rpm error: cannot get exclusive lock on /var/lib/rpm/Packages error: cannot open Packages index using db3 - Operation