-Run Javascript - dynamic action wait full?

Hello

Apex 4.2

I have a dynamic action that counts two real deposits

(1) Execute javascript code that calls a plsql process to fill a graphical xml field hidden.

(2) updates the table.

The javascript call is made now apparently asynchronously, which means that the table is freshening up before the pl/sql has had time fill the data of chart_xml.

I understand that some dynamic actions have an option "wait for result" of the execution, but is not available with JavaScript Code execution. I know almost nothing about Javascript, but I guess that this code:

Apex. Server.Process ('P3_UPDATE_CHART_XML', {}

F01: $.map ($('[Name="F01"]'), Function (e) {return $(e) .val ()})

},{

data type: "text",

success: function (pData) {}

});

Can be adjusted to wait for the pl/sql process to complete?

Out of my depth.

Thank you

Ralph

Apex. Server.Process is indeed by asynchronous design. Now you can either make the browser wait the result by making it synchronous, or you can define a function sur-succes that run when the call is completed. Going with async, you can define follow-up actions, but "blocks" the browser in the meantime.

Use the "async" parameter in the 3 param object:

apex.server.process('P3_UPDATE_CHART_XML',{
f01:$.map($('[name="f01"]'),function(e){return $(e).val()})
},{
async: false,
dataType:"text",
  success:function(pData){}
});

Or, since you have the function success there, we can qualify the update region in this chart (but you should give the region to chart a static id) and do not use false async:

apex.server.process('P3_UPDATE_CHART_XML',{
f01:$.map($('[name="f01"]'),function(e){return $(e).val()})
},{
dataType:"text",
  success:function(pData){ $("#myChartRegionStaticId").trigger("apexrefresh"); }
});

Tags: Database

Similar Questions

  • Code Action run Javascript dynamic Apex 4.1

    Hello world

    I want to know if there are known bugs on the dynamic Action (the Javascript code to execute).

    We did a dynamic action to action "window.open '.
    Window.Open ("& RAPPORT_URL_LANCEMENT", "_blank").

    But we have a problem. The first time, a blank page opens not mentioned by our URL page.

    We also tried to create a branch to our URL by does not open in another window. We want to keep given our open application page.

    What we can do for this?

    Thanks in advance. Good bye.

    Is RAPPORT_URL_LANCEMENT a Page or item of the application?
    Then, try window.open ($v ('RAPPORT_URL_LANCEMENT'), "_blank").

    It is a Substitution variable?
    Then, try window.open("#RAPPORT_URL_LANCEMENT#","_blank").

  • ORA-01461: can bind to a LONG value only for insert into a LONG column of dynamic Action

    I try to apply the condition to display items in a table with the following error code.its dynamic action when him save the day.

    event: click on

    Selection type: button

    name of the button: P23_ADD_MORE_ROW

    condition: no strings attached

    //P23_NAME_BY_CAT,P23_HOW_MANY as LOV  in apex form
    var l_no_rows;
    l_no_rows = apex.item("P23_HOW_MANY").getValue();
    for (var i=0; i<l_no_rows; i++){
      apex.widget.tabular.addRow();
    
    if  ($v("P23_NAME_BY_CAT")==1) {
    $("#WORK_QTY").show();
    $('td[headers=WORK_QTY]').show();
    $("#WORK_LOCTION").hide();
    $('td[headers=WORK_LOCTION]').hide();
    $("#MY_LOCTION").hide();
    $('td[headers=MY_LOCTION]').hide();
    //with morethan 25+ entry
    }
    else if ($v("P23_NAME_BY_CAT")==2) {
    $("#WORK_QTY").hide();
    $('td[headers=WORK_QTY]').hide();
    
    $("#WORK_LOCTION").show();
    $('td[headers=WORK_LOCTION]').show();
    
    $("#MY_LOCTION").hide();
    $('td[headers=MY_LOCTION]').hide();
    //with morethan 25+ entry
    }
    else if ($v("P23_NAME_BY_CAT")==2) {
    $("#WORK_QTY").hide();
    $('td[headers=WORK_QTY]').hide();
    $("#WORK_LOCTION").hide();
    $('td[headers=WORK_LOCTION]').hide();
    
    $("#MY_LOCTION").show();
    $('td[headers=MY_LOCTION]').show();
    //with morethan 25+ entry
    }
    else {
    alert("no  count");
    }
    };
    
    

    dynamic action above can ignite if you level column, it means when I choose LOV value so that specified columns will show only rest in a column will be hidden. up to 10 input works fine.

    Hi Ramani_apex,

    Is the action of javascript executed in the dynamic action of the code you posted above or more code?

    You seem to have exceeded a 4000 or 32 K bytes on a column of metadata for dynamic action when you set the dynamic action.

    function f_mybuttonAction () {
    //P23_NAME_BY_CAT,P23_HOW_MANY as LOV  in apex form
    var l_no_rows;
    l_no_rows = apex.item("P23_HOW_MANY").getValue();
    for (var i=0; i
    
    • Call the action javascript function run the dynamic action javascript code:
    //mybutton action
    f_mybuttonAction();
    

    Reference:

    I hope this helps!

    Kind regards

    Kiran

  • Obtain / use value radio in Apex plugin for dynamic action button

    Apex 4.2

    I'm working on a plugin that you run a dynamic action based on the value of a selected option button. I think its more so the syntax that is causing me problems.

    I have a point page (P127_DISPOSITION) reprsented as a group of radio buttons. There are three cases for the Group of radio buttons: CREATE, update, and THROW. The LOV source for the element on the page is:

    STATIC2: create new Inspection; CREATE, update of existing Inspection; Updated, throw; IGNORE

    I have a plugin that displays a map and a few other neat, tools and toolbars other clever tricks. When a user clicks on the radio button under the UPDATE, the card must hide some of these tools. This part is not so bad that I have the code for this. Here's what I or tried so far:

    $("#P127_DISPOSITION").change(function() {
    if ( $("#P127_DISPOSITION").val == 'UPDATE' )
    $("#draw_point").hide();
    $("label[for=\draw_point\"]").hide();
    } else if ( $("#P127_DISPOSITION").val == 'CREATE')
    $("#draw_point").show();
    $("label[for=\draw_point\"]").show();
    } else {
    $("#draw_point").show();
    $("label[for=\draw_point\"]").show();
    }
    });
    

    The statements in the IF statements are not the problem. I tested and been using these statements in my plugin for other reasons. These statements just to show or hide the toolbar. But I'm doing this action happens dynamically on a radio button is selected. So I know there must be some problems in the way I use the onChange function or the statement real himself.

    Any help on this would be greatly appreciated. Thanks in advance.

    NewApexCoder

    I don't think that your problem is with dynamic action, but how the html code that is generated when the plugin looks like.

    If the generated html code is not a type of entry right front, you need to write your own javascript code that overrights the apex.item () .getValue (default).

    To explain what I mean lets take a look at the native radiogroup and popup lov.

    A radiogroup of point P40_DISPLAY_RETURN of the page html code looks like

    Different display and return value


    As you can see the element with the id P40_DISPLAY_RETURN is the set of fields. Because the set of fields is not a value attribute neiter $x('P40_DISPLAY_RETURN').value and $('P40_DISPLAY_RETURN').val)

    the value will give you. Apex. Item ('P40_DISPLAY_RETURN'). GetValue() will return the C.

    And for the lov contextual element P40_POPUP_LOV of the HTML page looks like

    
    

    Now the P40_POPUP_LOV element is an input element, but the value is the value to display. So $x('P40_POPUP_LOV').value and $('P40_POPUP_LOV').val () will give you the display value ' OHare, Edward "Butch" While apex.item('P40_POPUP_LOV').getValue () returns the return value 4.

    Take a look at the getValue for both javascript code, you see that the functions are actually different and depend on the widget that is the element.

    getValue : function() {
      // get checked input value, in the context of the fieldset
      // note: can't use $lRadios here because this is a reference
      // to the initial state
      var lReturn, $lRadio;
      if ( pType === "checkbox" ) {
          // checkbox will return an array
          lReturn = [];
          $( ":checked", lFieldset).each( function() {
              lReturn[ lReturn.length ] = this.value;
          });
      } else {
          // radio group should return a single value
          $lRadio = $( pSelector + " :checked", apex.gPageContext$ );
          if ($lRadio.length === 0) {
          // check if the length of the jQuery object is zero (nothing checked)
          // if so return an empty string.
              lReturn = "";
          } else {
              // otherwise return the value
              lReturn = $lRadio.val();
          }
      }
      return lReturn;
    }
    
  • Can a dynamic action of type 'alert' display a value of field without javascript?

    Hello

    can a dynamic action of type 'alert' display a value of field without javascript ( alert ( $x (P '200_OP').value)); ?

    What should I write in the 'text' section to display in the alert, the value of P200_OP for example?

    Gianpaolo cordially

    Hi gianpagi,

    gianpagi wrote:

    I know that with "run JavaScript Code" works. My question is about action as 'alert '.

    Dynamic action "Alert" is expected to this only the string to display in the alert. May not be able to access the current value set in a page element.

    Therefore, "Run the Code JavaScript" only works in this case where your can integrate the current values of the DOM html elements

    If you notice that da 'Alert' request 'Text' and 'Execute JavaScript Code' DA 'Code' request to be executed.

    Kind regards

    Kiran

  • APEX 5: Dynamic Action do not run on DEMAND Condition = VALUE

    After migration from APEX to APEX 5 dynamic action 4.2.5 which performed in 4.2.5 won't work in 5 APEX.

    Event DA: BEFORE the PAGE is SENT

    Condition: Ask = value

    Value: SAVE

    Page contains the button SAVE, in the debug REQUEST window appears like SAVE, but DA does not occur.

    When the condition is not defined, DA works correctly in the APEX 5.

    Is this a bug in 5 APEX?

    Hey Bozo,

    Bozo says:

    How to have this in mind, can be made to run before Page submit DA specified button click?

    It depends on what you want to achieve a click of button and what you want to achieve with DA.

    The purpose of the button and DA can be combined in a javascript function or in the DA himself.

    How this can be achieved in the DA itself is:

    • Instead of shooting the DA "before submit Page', fire the DA to the click event of button. (to do this change the button action to listen for events from DA)
    • In the first real action, run everything you want to achieve with DA.
    • Write another real action, to submit the page and set the application to any value you want. (ensure that the processes we submit are conditional on the overall application, instead of the State of the button)

    Kind regards

    Kiran

  • Alertify Plugin - how to call via Javascript and not by a dynamic Action

    Hello

    Environment: Oracle APEX v4.2.1 | Oracle 11g R2 | IE8 Web browser

    Hoping someone can help, I use the plugin Alertify via a dynamic Action, but my question is, instead of use this via a dynamic Action, I actually want to make the same call I do via a dynamic Action but rather using javascript.

    So, by using a shape any JavaScript API in the Alertify plugin, I want to call an alert notification standard with the message and the delay effect until it disappears once more.

    Is it possible to call this plugin in this nature using javascript?

    Thank you.

    Tony.

    You can always use the plugin and a custom event.

    Create a dynamic action:

    • Event: Custom
    • Custom event: ALERTIFY_DELAY
    • Selection type: jQuery Selector
    • Selector: body
    • 1 real action:

    Add the following code to the section "run when Page Loads:

    window.setTimeout(function(){
      $('body').trigger('ALERTIFY_DELAY');
    }, 3000);
    

    This will cause the "ALERTIFY_DELAY" event fires after three seconds.

  • Dynamic action to execute PL/SQL that calls a JavaScript alert - does not

    Greetings,

    I'm stuck!  I use the Apex Version 4.2.2.  I have a requirement that, when the user fills Field1, I check the database to see if the value of field1 has already been used.  If it was used, I have to inform the user, but the user is allowed to reuse the value - that is to say, duplicates are allowed.  My thought is to use a dynamic action to check the onchange of value running pl/sql to check (via a function in the database) and if it returns true, use a javascript alert to inform my user value is used.  They can then close the alert and change (or not change) the duplicate value

    I did the following:

    1 wrote a PL/SQL function in my utility package in the database - we'll call it apps.my_utils.check_value_use (p_my_val in varchar2) return Boolean - it works.

    2. created a dynamic Action with the following properties for P1_FIELD1:

    Event: change

    Selection type: item (s)

    Product (s): P1_FIELD1

    Condition: is not null

    3. the dynamic Action has an action - real Action

    Action: Execute the PL/SQL Code

    Page items to submit: P1_FIELD1

    PL/SQL code:

    BEGIN

    IF apps.my_utils.check_value_use(:P1_FIELD1) = TRUE THEN

    HTP.p ("< script type =" text/javascript "> '");

    HTP.p ("alert (" this value is used ""); ")

    ');

    HTP.p ("< /script >" ");

    END IF;

    END;

    When I run the page and fill in Field1 with a value that I know is in use, I get the following error:

    Error: parsererror - SyntaxError: JSON.parse: unexpected character

    Help, please.  I already spent too much time on this apparently simple requirement.

    Thank you

    J.

    BEGIN

    IF apps.my_utils.check_value_use(:P1_FIELD1) = TRUE THEN

    HTP.p(' ');

    END IF;

    END;

    Avoid doing this. Try the following method:

    (1) create a dummy hidden element to store the result of your validation of PL/SQL. Lets call it P1_DA_ERR

    (2) in your PL/SQL block put this point hidden in the field "Page point back.

    (3) in your PL/SQL block placed the result of your validation in this element hidden as

    DECLARE
    l_err PLS_INTEGER := 0;
    BEGIN
    -- An example
    IF 1=1 THEN
    l_err := 0;
    ELSE
    l_err := 1;
    end if;
    :P1_DA_ERR := l_err;
    END;
    

    (4) add a true other "Run Javascript code" type action. The could should look like:

    if(parseFloat($v('P1_DA_ERR'))==1)
    {
    alert('Error occurred');
    }
    
  • The dynamic action of javascript

    Hello

    Good evening.

    I am aware, that we can trigger dynamic actions in multiple ways, based on events of the DOM.

    can someone help me triggering a dynamic javascript action.

    But not based on events.

    Ex: name action dynamic, based on its name or sequence or in any other way.

    There are situations where I have to call dynamic measures to avoid hand-written Ajax calls.

    Thanks in advance

    Hello

    The correct answer to this post:

    Not sure why the following code lines failed to trigger a dynamic action

    $("#P0_SIGNAL").val (123) .changes (); --Also failed
    $("#P0_SIGNAL").trigger ("change");  --Also failed

    This line would trigger a dynamic javascript action.
    Apex. Event.Trigger ($("#P3_TEST_ID"), "change","" ");


    Steps to make it work.


    I need to trigger a dynamic action when a value is set to hidden JavaScript element


    P3_TEST_ID is a hidden item.

    Create a dynamic action to shoot the P3_TEST_ID change event.

    Setting the value of p3_test_id of javascript wouldn't trigger a dynamic action.

    Run the following code to fire the javascript DA

    Apex. Event.Trigger ($("#P3_TEST_ID"), "change","" ");

  • Help with dynamic Action with pl/sql and Javascript

    Hi all
    I'm a little hard with the following and I was wondering if someone can help me.
    My test app is here:
    http://apex.oracle.com/pls/apex/f?p=32581
    
    workspace: Leppard
    Login: guest
    pw: app_1000
    
    Tab: DB Link (page 19)
    I have a list of unique selection on the page that queries a table in my diagram.

    This is the flow that works, but not the user experience I want:
    User clicks on the button Create Page 19 > the next page, page 20, appears as a popup window > user enters the name of the link = "MyLink" (or other) and one unit number, i.e. 1234 (or other) > user clicks 'Create using process' button > success message > user closed the window to return to the page 19 > user clicks LOV refresh to refresh the list of selection so that the new value is displayed.

    That's what I'm aiming for: user clicks on the button Create Page 19 > the next page, page 20, appears as a popup window > user enters the name of the link = "MyLink" (or other) and one unit number, i.e. 1234 (or other) > user clicks button "create using the DA ' > dynamic action is called running pl/sql closes the popup window and refreshes the list of selection on page 19.

    I know that I have some problems with my dynamic action. First of all, the pl/sql is not yet recognize the values that I enter the fields in item on page 20. I created a first pl/sql "null;" to force these items in session state, but it does not work for me and the pl/sql just inserts a null value into my table. Secondly, I can't get javascript to fire code to refresh the list of selection on page 19. The code I use in the DA is the same thing as what is behind the button refresh LOV, so I am confident that the code works, I just can't get this fire click the button "create using the DA" on page 20.

    Sorry if this is confusing - I can clarify if necessary, let me know. Thanks in advance. Of course I'm still learning...

    John

    Published by: John K. on May 30, 2013 19:28

    I modified your DA as follows.

    In real Action of DA,.

    1 Seq 10, I added the element page 20 Page points to submit and return Pagenames. You forgot to add items here
    2 Seq 20, I changed your simple code to insert. Simple code just insert
    3 Seq 30, I added the new code to close the window and reload the window open.

    Thank you
    Lacombe

  • Associated with dynamic action JavaScript error

    All,
    I'm on 4.2.1 Apex and have encountered an error with the Javascript action that performs a simple calculation of a ratio of two fields. I applied exactly same methodology to 3 other fields that have the same calculation of ratio and they work fine. The fourth field I get the result "NaN", from what I understand, not mean 'a number' in JavaScript. All fields related to the table columns defined as number.

    This one works-
    $x('P3_STUDENT_INFO_PERC_MIN').value =.
    $x('P3_STUDENT_INFO_MIN).value / $x('P3_STUDENT_INFO_TOTAL').value;

    And as I said, 2 other calculations, exactly like this work a fine - field is filled in with the division calculated. But the fourth is not:

    $x('P3_FACULTY_INFO_PERC_MIN').value =.
    $x('P3_FACULTY_INFO_MIN').value / $x ('P3_FACULTY_INFO_TOTAL') .value;

    I checked the field types, and they are entirely digital. All are null to start but as I fill in the fields in the numerator and the denominator, the dynamic action works very well for 3 of them, but not for the 4th. Even when I fill out the values, NaN remains in the calculated field. Maybe there's a limit to how many dynamic actions?

    ALSO - the action parameters are identical for all. Fire on loading the page, the event is 'Change', element type, the condition is that the value of the target report item is null.

    Help!

    Pat

    Published by: patfmnd on February 14, 2013 13:57

    Pat

    Have you checked what are the actual values of P3_STUDENT_INFO_MIN and P3_STUDENT_INFO_TOTAL.
    Use your browser development tools to debug. Or put in some alert messages.

    It could be as simple as a space after the name of the element.

    Also, personally, I prefer to work with $v ('P3_STUDENT_INFO_MIN') to get the value of the P3_STUDENT_INFO_MIN point.
    $x('P3_FACULTY_INFO_MIN').value only works for items that have the value such as elements of entry attribute. But it does not for example a select element.
    $v al covers the types of different elements and also returns a value when the element does not have a value attribute.

    $s ('P3_FACULTY_INFO_MIN', value_variable) is the Set accessor function.

    If you still can't run the installer a manifestation of the problem on apex.oracle.com so we can have the eye.

    Nicolette

  • In cascade LOV and calling a javascript function thro dynamic action

    We have a page where there are lovs cascaded to the country / state. The selection of State list is cascaded with country LOV. We also request a javascript to normalize the child lov (State), so that if there is no value in the list, the lov will be disabled and if there is only one value for show, which will be set as default (enabled). However, it seems apex runs javascript code standardize everything first and then generates the list for the lov State, then the State lov is always disabled.

    I created a page similar to apex.oracle.com with choice of Department lists and employee. The link to the page is http://apex.oracle.com/pls/apex/f?p=40631:2

    In this page, the employee selection list is cascaded to the Department. (1) to any value other then 'IT' or no selection value in the list of DEPARTMENTS, the list of employees must be enabled and should list all the names of appropriate employees. (2) for the selection of the 'IT', it should be disabled with the default selection as "no data found". However it does not for 1). Could someone find the problem and give a possible solution.

    Javascript code executed (that thro NatStandardizeLOV1('P2_EMPLOYEE') dynamic action for Department change is lower.

    < code >
    function NatStandardizeLOV1 (pitem)
    {
    var obj = document.getElementById (pitem);
    obj. Disabled = false;
    obj.options [0]. Text = "SΘlectionner one..";


    If (obj.type is "select one")
    {

    If (obj.length == 1 & & (obj.options [0] .value == ": obj.options [0] .value == null))
    {
    obj.options [0]. Text = "No. Data."
    obj.disabled = true;
    }
    If (obj.length == 2 & & (obj.options [0] .value == ": obj.options [0] .value == null))
    obj.options [1]. Selected = true;
    }
    }


    < code >

    Thank you in advance,

    Natarajan

    Published by: Nikita on May 27, 2011 04:21

    Natarajan,

    The question is one of the time. You're service is running before the Ajax request (triggered by the LOV cascading) brings back the items. So change the 'when' of dynamic Action so that it fires the event "After Refresh" of the question of the Department rather than the event change.

    Kind regards
    Dan

    blog: http://danielmcghan.us/
    work: http://SkillBuilders.com/APEX/

  • Use Dynamic Actions with pl/sql, calling a javascript alert function

    Hello

    I use Apex 4.0.1.00.03 with IE7.

    The problem I have is:

    I am converting an Oracle Forms application that has a lot of logic in it. In the application forms, it is a pl/sql function, based on a If/else condition call a popup alert box, which displays a warning message. He called pl/sql functions that return raising to the IF statement.

    Example of pl/sql code:

    If check_records() > 0 Then
    message to the alert box
    ElsIf TypeA_record then
    message to the alert box
    On the other
    message to the alert box
    End If;

    I need to replicate this functionality to the Apex 4. I tried to create dynamic Action on a page element, using a pl/sql function, however, when I call the popup javascript, this code not popup an alert box. I need the pl/sql to be run when the element of the page changes, not when the page is sent.

    The code I used to test the pl/sql code, which does not work in dynamic Actions > pl/sql is:

    Begin
    HTP.p ("< script type =" text/javascript"> '");
    HTP.p ("alert ("today runs javascript code!");"
    );
    HTP.p ("< /script >");
    End;

    I need to create a pl/sql function that can do alert areas based on an IF condition.

    Could someone point me in the right direction? Using dynamic shares the best way forward? I need to trigger on a page element, change the value.

    Works fine now.
    In the javascript code, I changed:

    get.addParam ('x 01', $v ('P105_PREP_TYPE'));

    by

    get.addParam ('x 01', $v ('P1_PREP_TYPE'));

    P1_PREP_TYPE is the correct name of the element.
    Now when I choose the OTHER, 1 message.

    Concerning

  • Dynamic Action condition javascript checkbox.checked count &gt; 0

    Hi all

    I'm stuck with a condition of the dynamic action. I have the following:

    $("#P302_COMPANY").val () .length > 0 & & ($("#P302_DEPARTMENT").val () .length > 0 | $("#P302_PRODUCT").val () .length > 0 | $("#__P302_INDUSTRY__").val () .length > 0)

    What would be nice if all items were areas of text, but P302_PRODUCT and P302_INDUSTRY are the lists box, and I want to check if 1 or more values in the list are checked... but I can not work how to do it... any ideas?


    Thank you

    TSD

    Hi Tod

    then three is still fair to say if the element has a checked value?

    Yes, but not straight forward.  You need a javascript routine that traverses the dom looking for items of type box to the appropriate div, and then, for each item in the loop, set a flag if the checkbox is set (assuming that you only 1 of the total updated check).

    Another way would be to create a hidden page element, say P302_PRODUCT_CHECKED, then put a dynamic action on the element of the page P302_PRODUCT with the onclick event and a condition that if the box return value is not null, then the real event will mark the beginning session state (PL/SQL Expression - apex_util.set_session_state) and the value for P302_PRODUCT_CHECKED to say 'Y '.  You would need a false event to set P302_PRODUCT_CHECKED to null if the checkbox is not set. You can then test #P302_PRODUCT_CHECKED == 'Y '.

    Concerning

    Paul

  • With the help of JavaScript condition in the dynamic action of JQuery selector

    Hi guys,.

    I have a Setup master detail on a page.

    The detail section, I have a tabular presentation.  One of the fields is a selection list.  The first record in the select contains the value * not * that has a value of primary key for the 1.  I have a distinct region with a simple text field where the user can insert a value into the table if the value does not exist.

    I want than the region of text element to only appear if the value * not listed * is selected.

    I managed to make it work when the value is selected with the help of dynamic action with a bit of JQuery and JavaScript by setting the ID on the selection list to 'create' and have the following in JavaScript $(this.triggeringElement) .val ()! = 1 in the JavaScript for dynamic action condition shows it or hides the region of 'create' and that works well.

    However, if the secondary table is empty before the detail records were created (nothing selected in triggering jQuery Selector) the region of create is displayed when I don't want it.

    I guess I need some sort of NVL in JavaScript condition?

    I use APEX v4.2.

    Any advice would be appreciated.

    Chris

    Cashy wrote:

    I have a Setup master detail on a page.

    The detail section, I have a tabular presentation.  One of the fields is a selection list.  The first record in the select contains the value * not * that has a value of primary key for the 1.  I have a distinct region with a simple text field where the user can insert a value into the table if the value does not exist.

    I want than the region of text element to only appear if the value * not listed * is selected.

    I managed to make it work when the value is selected with the help of dynamic action with a bit of JQuery and JavaScript by setting the ID on the selection list to 'create' and have the following in JavaScript $(this.triggeringElement) .val ()! = 1 in the JavaScript for dynamic action condition shows it or hides the region of 'create' and that works well.

    However, if the secondary table is empty before the detail records were created (nothing selected in triggering jQuery Selector) the region of create is displayed when I don't want it.

    I guess I need some sort of NVL in JavaScript condition?

    I use APEX v4.2.

    Simple solution is to hide the region containing the element of text by default, using the style = "" view: no ' in the property of the attributes of the area in the region. " It will be always hidden when the page initially, but its visibility will be controlled by the DA subsequently.

Maybe you are looking for