Conditional Dynamic Action

Good Afternoon, everyone.
This is my problem, I created a dynamic action to append a value of a
text field with autocomplete named P3_OBJECT on a shuttle when I press the button "add".
I use javascript for that.
But I only want for this action to be triggered when this query return
at least one row: SELECT DISTINCT OWNER||'.'||OBJECT_NAME
FROM DBA_OBJECTS
WHERE OWNER||'.'||OBJECT_TYPE=:P3_OBJECT;
I tried to put the dynamic action to be conditional with a sql exist expression, but it didn't work.
Can anyone give me any suggestions on how I can solve this problem?
Regards, Leandro Freitas.

Oh, i see. Got it. So if you just change your javascript to pop the value of P3_OBJECT up in an alert does it work? Just want to rule out JS logic error.
I'm also assuming you get no javascript syntax errors in your system console either?
Also, did you try:
WHERE UPPER(OBJECT_TYPE) = UPPER(:P3_OBJECT)
Or if you remove the condition, does the value pass? Again, just dumping out an alert?
It could be that the condition is always failing.
Having to start with basic stuff. Flying a little blind.

Similar Messages

  • Multi-condition Dynamic actions

    Is it possible to have multi-condition dynamic actions e.g. hide field A if field B is null and field C is set to 'ABC'

    Hi Pod,
    yes but in that case you have to use a JavaScript Expression as condition type. In your example that would be
    ($v_IsEmpty("B") && $v("C") === "ABC")Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • IRR dynamic action filter does not work when condition set.

    Hi All
    I've set up a filter on an Interactive report using a dynamic action. The fiilter is used to display records that expire within a term ( example 30,60,90 days.) The dynamic action is set to fire On Change. This all works fine as long as I do not set the report condition to only display when P1_DAYS is not null.
    I am using a report template that includes #REGION_STATIC_ID# as referenced in this post -
    http://anthonyrayner.blogspot.com/2010/07/report-filtering-with-apex-40-dynamic.html
    I hoped not to display a blank report region .. wait until after the user selects the "term" before displaying the results. Any workaround suggestions would be appreciated.
    Version -
    Application Express 4.0.1.00.03
    Thanks
    MO

    Kindly check the following link for reference.
    sample configuration link
    http://www.cisco.com/c/en/us/td/docs/wireless/controller/5700/software/release/3se/security/configuration_guide/b_sec_3se_5700_cg/b_sec_1501_3850_cg_chapter_01110.html
    http://www.cisco.com/c/en/us/td/docs/wireless/controller/7-0/configuration/guide/c70/c70intf.html
    Trouble shooting link
    http://www.cisco.com/c/en/us/support/docs/security/secure-access-control-system/113485-acs5x-tshoot.html

  • Refer to Tabular Form field in Condition of Dynamic Action

    I tried to filter on this topic but didn't come up with anything.
    Is there a way to refer to a field in a tabular form as a condition of a dynamic action?
    For example, I want to pop up a message (javascript 'alert') when the value of one field in a tabular form is changed, but only if another field for that same row meets a certain condition.  So let's say the field in the condition is XYZ.  So in the condition section, i would have PL/SQL Expression - XYZ IS NULL.  Something like that.  How would I refer to that XYZ field from my tabular form in the condition section of a dynamic action?
    Thanks in advance.
    John

    Thanks for your help on this.  I think going with the action being an 'execute javascript code' is a good approach.  So here is my situation - I have a tabular form.  I have 2 fields (among others) - SPECIES and WEIGHT.  The SPECIES is a select list in the tabular form.  The WEIGHT is a text box in the tabular form.
    To make this simple, let's say this is for only one species - SNSG.  If the person changes the select list to SNSG and the associated WEIGHT field is NULL, I need to pop up a message that says 'Fill in weight field if selecting SNSG'.
    So here is what I have:
    Event: Change
    Selection Type: jQuery Selector
    jQuery Selector: :.speciesClass
    Condition: In List
    Value: SNSG
    True Action: Execute JavaScript Code
    ** Here is where I am stuck: In the JavaScript code I need to this:
    If WEIGHT is null THEN:
    confirm('Warning: Enter weight if entering SNSG species.');
    I am not sure how to write that "If WEIGHT is null THEN" part in javaScript and be able to refer to the WEIGHT field associated with the SPECIES value I just changed in the tabular form.
    I hope that makes sense!
    I appreciate your help!!
    Thanks,
    John

  • How to specify 2 conditions in when settings for 2 items in dynamic actions

    Hi,
    How to use 2 conditions for 2 different items in Page rendering ->dynamic actions-------when event settings
    Actually i have three items like A nd B nd c
    If A=v,x,y,z and B=k,l............ i need to set some content like
    "werttyyyy" in c  and i need to make it as disable
    if A=v,x and B=k ..................
    i need to enter the text in c  which i would  like to be freetext  and i need to make it as enable now
    here it is i struck  ------------Page rendering ->dynamic actions-------
    when
    event
    change
    select type
    items
    items
    a,b
    condition
    <<<<<< how to mention my condition in tis column>>>>>>>>>>>>>>>>>>>>>>>
    Regards,
    Pavan

    Hi JTan414,
    I have check the expression you have provided and there are many incorrect using of this expression, please check and do some modification as below:
    For the MonthName function you should follow the grammar like:
    =MonthName(10,True)
    =MonthName(Month(Fields!BirthDate.Value),False)
    ="The month of your birthday is " & MonthName(Month(Fields!BirthDate.Value))
    You have add the dataset name "DealStarts" at the wrong place, it should like below:
    =Last(MonthName(Month(Fields!BirthDate.Value)),"DealStarts")
    or
    =Last(MonthName(Fields!IntegerValueField.Value),"DealStarts")
    This will return the last value from the dataset
    There is no function named launchdate, expression "launchdate ("RowofTrendingVisibility")" is incorrect and you shouldn't add the datasetname in this way.
    If the expression involved of conditions from two different datasets, limit kinds of functions will support to use:
     =Last(Fields!BirthDate.Value,"DataSetName")
    =First(Fields!BirthDate.Value,"DataSetName")
    More details information about how to use expression in SSRS:
    Expression Examples (Report Builder and SSRS)
    If you still have any problem, please try to provide more details information about your requirements and also some sample data.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Dynamic Action - How to enable  text field based on a condition

    Hi,
    I have two text items. Need to create dynamic action for the following,
    1. Order_type - Drop down values having CONSUMER & WHOLESALE.
    2. Order_number- Text field
    Order number should be disabled and only on selection of order type ,order number should be enabled.
    Can someone please help me on this?

    Hi Gayathri,
    Gayathri Venugopal wrote:
    Hi,
    I have two text items. Need to create dynamic action for the following,
    1. Order_type - Drop down values having CONSUMER & WHOLESALE.
    2. Order_number- Text field
    Order number should be disabled and only on selection of order type ,order number should be enabled.
    Can someone please help me on this?
    Create two dynamic action
    1. Make it order number item disable on page load.
       Event : Page Load
       Action : Disable
       Fire When event result is : True
       Selection Type : Item
       Item : Your order number item
    2 . enable and disable order number on selection of order type(assuming when order type is null it is disable otherwise it is enable)
        Event : Change
        Selection type : item
        Item : your order type item
        condition : is not null
    True Action
        Action : Enable
        Fire When event result is : True
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    False Action
        Action : Disable
        Fire When event result is : False
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    Hope this helps you,
    Regards,
    Jitendra

  • Conditional on dynamic action result?

    I have a form that has a dynaminc action on it that sets the value for an item P2_Date. The value is queried from another table. In most cases, the query will return a date for the item and it works out well. This item is triggered upon picking a DA_Number. Once the DA_Number is selected from the form, the dynamic action is summoned, the query does its querying and populates the date field with a date (P2_Date). However, there are some cases that the query will return a NULL value (there is no date associated with the selected DA Number). On the form, the request field looks blank, like there's nothing there. So once I hit submit, the date is left blank on my report
    Is it possible to place a conditional on that value that is queried (P2_Date)? Once I select a a DA Number, if it returns a NULL/blank for the P2_Date field, I want the user to be able to select the value/date and capture that date to be submitted. I already have the date field set as a "DatePicker", but when I enter in a date, it is not being captured
    Is there anyway to capture this? Thanks in advance.

    Hi again,
    Thanks for helping out!
    this is how it is now, and it is working a bit to well;).
    Now the rule applys for all company codes so the check on company code is not working.
    As long as the action is SD they get the 2PEN subtype in IT2010.
    Any suggestions to what is wrong now?
    Thanks
    0001                   04     403     P     *UPDATE IT2010 WHEN ACTION SD
    0001                   04     405     P     PSPAR-MASSN='SD'
    0001                   04     407     P     P0001-BUKRS='1200'/X
    0001                   04     410     P     P0001-BUKRS='1035'/X
    0001                   04     411     P     P0001-BUKRS='1147'/X
    0001                   04     412     P     P0001-BUKRS='1001'/X
    0001                   04     413     I     INS,2010,2PEN,,(P0000-BEGDA)/D
    0001                   04     414     W     P2010-BETRG='1'

  • Leaving a Page fires "Page Unload" dynamic action?

    Hi,
    Which Dynamic Action fires when I am leaving a page.
    I have a page with lot of items, I want to fire alert based on some condition when user leaving that page (suppose user clicks to say some TAB), I used *"Page Unload"* dynamic action, but somehow it's not working.
    Is there any other Event I have to use?
    Thanks,
    Deepak

    Thanks.. VC
    but I cannot use that plugin as I have a Page which call other pages using iFrame and I am facing some issue..
    I have created a separate Post for this but not able to resolve it till now.. Here is the Link.
    Re: "IFrame Region" Plugin / Save Before Exit (3.0.2) - Dialog box - Question
    Thanks,
    Deepak

  • 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

  • Dynamic Action based on Interactive Report Select List Value

    I'd like to perform a Dynamic Action when a user selects one of 3 options from a Select List within an Interactive Report:
    select APEX_ITEM.SELECT_LIST(
    p_idx => 3,
    --p_value         =>   deptno,
    p_list_values => 'Copy;Copy,Delete;Delete,Export to PDF;Export to PDF',
    --p_attributes    =>   'style="color:red;"',
    p_show_null => 'YES',
    p_null_value => NULL,
    p_null_text => '--Select--',
    --p_item_id       =>   'f03_#ROWNUM#',
    p_item_id => 'P6_IR_SELECT_LIST',
    p_item_label => 'Label for f03_#ROWNUM#',
    p_show_extra => 'YES') "Actions"
    from dual;
    When building the Dynamic Action, I chose the following values from the Advanced wizard
    Event: Select
    Selection Type: DOM Object
    DOM Object: P6_IR_SELECT_LIST
    Condition: Equal to
    Value: "Delete"
    True Action: Execute Javascript Code: Alert('Here');
    Doesn't seem to be firing...can anyone help?
    Thanks in advance,
    John

    Hi,
    I am not sure if the "equal to" condition applies to a DOM object... after all, a DOM object can be anything (any HTML element) not only a field.
    Try using a javascript expression instead, like this:
    $v('P6_IR_SELECT_LIST')=='Delete'UPDATE: Sorry, I just tested and "equal to" condition works for DOM objects... should have tested before posting!
    Luis
    Edited by: Luis Cabral on Feb 29, 2012 4:45 PM

  • Dynamic Action on apex items

    Hi,
    I have a requirement like after entering the date of birth in the item. then age value should be set dynamically.
    how can i set the value?

    Hi Tulasi,
    Follow the below steps
    Click on create button-Dynamic action
    select Advanced type
    Give some name
    event - On change
    selection type - item
    item(s) - your page item(used to select date of birth)
    condition - no condition
    action - Execute PL/SQL code
    Fire on page load - blank
    PL/SQL code -
    declare
    v_age varchar2(100);
    v_dob date;
    v_sysdate date;
    begin
    select sysdate into v_sysdate from dual;
    v_dob := :P1_DOB;    //here P1_dob is a page item from where i am selecting date of birth.
    select trunc(to_char((v_sysdate - v_dob)/365)) into v_age from dual;
    :P1_AGE := v_age;     // i have created one item named P1_AGE to display the calculated age.
    end;Page Items to Submit = P1_DOB // replace with your datepicker page item
    Page Items to Return = P1_AGE // replace with your item.
    Hope this will give you some idea.
    Thanks and Regards,
    Jitendra

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

  • 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 Action On Date Picker

    Hi,
    I need help with understanding dynamic actions. I have two date pickers, I want the value of the first date picker to be the minimum date of the second date picker. To achieve this I have a hidden item whose value I want to reflect the selected date in the required format. In the dynamic action on the date picker I have no condition, and the true action is set to execute the following pl/sql code
    :P200220000_Y_MIN_DT := TO_CHAR(TO_DATE(:P200220000_Y_STR, 'DD-MON-YYYY'), 'YYYYMMDDHH24MI');. The items to submit field contains both the first date picker and the hidden item.
    The "P200220000_Y_MIN_DT" is now passed into the minimum date field of the second date picker. The problem is when the date is changed the hidden item does not get the value until the page is refreshed.
    Am I doing something wrong or just have not mastered the use of dynamic action or are my colleagues right use AJX call backs not dynamic actions.
    Thanks
    Aderemi

    Hi Aderemi,
    first of all as already explained, the min/max values are already used on the server side when the necessary code for the date picker is rendered. When you changed the referenced values in the browser, these values will not change the behavior of the client side date picker widget. But when you submit the page, the new min/max values will be used by the date picker validation check on the server.
    To over the client side date picker display issue, you could directly call the date picker JavaScript code and pass in the new min/max values. Have a look at http://jqueryui.com/demos/datepicker/
    So for example you could have a dynamic action of type "Execute JavaScript code" which executes the following Javascript code.
    apex.jQuery('#P200220000_MY_DATE_PICKER').datepicker("option", "minDate", "-1m");I think that should work. Note: I haven't tested if that really works and it's also some kind of unsupported, because it uses the underlaying jQueryUI APIs the APEX date picker is using. This could change in the future and would invalidate your code.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

Maybe you are looking for

  • Panasonic and Final Cut pro on iMac

    Hello I have a Panasonic HDC-HS80 Video Camera. I work with Final Cut Pro 7.0.3 on an iMac with OS 10.6.7 Do I have to set a special recording Mode on my camera? How Do I get my videos from the camera to Final Cut Pro, so that I can cut and edit them

  • Execute linux command from java

    I wanna execute linux command from java, bu the output has error: Return code = 1 top: failed tty get The code as: import java.io.*; public class Execute {      public static void main(String[] args) {           try {                final Process pro

  • Why does Adobe Reader and Adobe Flash player keep installing McaFee Security Scan on my system?

    Whenever I install the Adobe Flash player or Adobe Reader on my system, it downloads and installs McAfee Security Scan Plus at the same time. It does not ask if I want it or not, it instead forces it on me, so I have to then unistall it. I've unistal

  • Cannot logon through SAP Logon

    Hello Guru's, I have create an instance (ERP Foundation Extension powered by SAP HANA ) CAL successfully. however, I'm not able to connect to SAP with my SAP Logon. When I click on Connect, I use the SAP Logon shortcut to have access to my system and

  • HT4623 having trouble getting driver for my i phone 5 ?

    having trouble getting DRIVER for my i phone 5