This discussion is archived
6 Replies Latest reply: Sep 30, 2013 9:06 AM by Crimsntyd RSS

Dynamic Action/Select List

Crimsntyd Newbie
Currently Being Moderated

Hi,

I'm trying to change a field in a form based on the change of a select list on the same form.  I want to do this without submitting the page.  I've been able to do this via dynamic actions and Change/DOM Object, the DOM Object being the select list.  The text area that I want to change text in is working properly in this regard, without submitting the page.

 

However, I can't get the select list to actually change to the value that I select.  It doesn't matter if I use a dynamic action to submit the page (a second "TRUE" statement after the "change the text area" statement), or select "Submit Page" under "Page Action when Value Changed" in the element properties itself.  The select list doesn't change to the new value I select.  Is this a bug in 4.2?  I can't think of an instance where I WOULDN'T want the value I select to be submitted when I use the select list.  Any help out there?  Thanks.

  • 1. Re: Dynamic Action/Select List
    vincent_deelen Pro
    Currently Being Moderated

    Hi,

     

    What do you mean by ' I can't get the select list to actually change to the value that I select'? Can you put an example on apex.oracle?

     

    Regards,

    Vincent Deelen

  • 2. Re: Dynamic Action/Select List
    Crimsntyd Newbie
    Currently Being Moderated

    Sorry, Vincent.  I'd rather not show the screen shot, it has proprietary material on it.

     

    I have two dynamic actions tied to the "Change" of the select list on the form.  The first changes the text in a text area on the form via a PL/SQL function.  Which works correctly.  The second action is "Submit Page".

     

    Let's say the select list contains the values "ABC", "DEF", and "GHI", and that it's currently "ABC", and the dynamic actions are triggered when I select "DEF".  What I mean in the previous post is, when I select "DEF" in the select list, the text changes in the text area as it should, and the page submits, but when the page is done refreshing, "ABC" is still showing in the select list.  It didn't change to "DEF", nor did it submit the value to the database.

     

    Thanks for your reply.

     

    -Neil

  • 3. Re: Dynamic Action/Select List
    vincent_deelen Pro
    Currently Being Moderated

    HI,

     

    Sounds like your submit process isn't working.

    Check if your select list has a proper query containing display and return values. Make sure there is a submit procedure that handles your DML, and make sure the table column you submit your select list return value to, is of the same type. Also check if your submit button has the correct request to actually trigger your submit process.

     

    Regards,

     

    Vincent

  • 4. Re: Dynamic Action/Select List
    Crimsntyd Newbie
    Currently Being Moderated

    Hi, Vincent-

    Thanks for the ideas.  There is a submit procedure, but it's conditional on a button being clicked on the page.  I'm submitting the page via javascript (doSubmit()) or dynamic action when the select list is changed.  Do I need to create another submit procedure for when that happens?  The table column and submit buttons are in place and work correctly.

     

    Regards,
    Neil

  • 5. Re: Dynamic Action/Select List
    vincent_deelen Pro
    Currently Being Moderated

    Hi Neil,

     

    If I'm not mistaken the submit procedure expects a request, since it's conditional. Typically this is the button name of the button that triggers the procedure - my guess is that's something like 'SAVE' or 'SUBMIT'.

    Add that submit condition to your javascript: doSubmit('SAVE'). If that works, it would be nicer to create an extra submit procedure, conditional to another button condition, say 'CHANGE' or 'JS' and use that as request for your doSubmit.

     

    A completly different approach: you could also try to do your chagen process and submit with AJAX: Using AJAX in Your Application

     

    Regards,

     

    Vincent

  • 6. Re: Dynamic Action/Select List
    Crimsntyd Newbie
    Currently Being Moderated

    Vincent, I tried doSubmit('SAVE') and it worked perfectly.  Thanks for your help!  (I'm still learning javascript)

     

    Regards,

    Neil

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points