3 Replies Latest reply on Apr 18, 2012 6:42 PM by 902143

    How to do this ?

      Hi Guys,

      I have a simple form with 3 fields. Name, Email, Phone#. Name field is a LOV control. I added a dynamic(pl/sql) action to Name filed which get fired for GetFocus event.
      what i need is, When user selects a name pl/sql dynamic action should fire which will query a table and get respective email and phone# for selected user name and display it on the UI.

      What i see is dynamic action is getting fired and it sets the values to new fields but values doesn't show up on the UI. i was able to see the values by checking session values. i can see the values when i do a manual refrech(F5). how can i solve this issue ? simply values being set to those 2 fields should show up on the UI once user has selected a name from LOV pop up.

      Thanks guys,

        • 1. Re: How to do this ?
          Marko Goricki
          Hi Kuru,

          what version of APEX you are using?

          You should change DA event to onChange and then use Set Value DA Action or Execute PL/SQL code with defined Page Items to Return (email and phone in your case).

          1 person found this helpful
          • 2. Re: How to do this ?

            Are you trying to avoid submitting the page?

            If submit page is OK, I usually do something like the following:
            1) Set the Name field action to "Submit". In the Settings section of the "Name" page item you should see "Submit when Entered pressed". Set this to Yes.
            2) Add a page process, On Load - Before Header, to set the e-mail and phone fields equal to whatever is in the database for the given name, conditionally if the name is found in the database.
            3) You may need to include a branch back to this page.

            When the page reloads, if a name is in the name field, the process should load the e-mail and phone.

            Hope this helps,
            • 3. Re: How to do this ?
              Hi Marko Goricki,

              Thank you for the reply. What i was missing in my logic is that return statement in pl/sql body. instead i was using typical assignment a := :b;

              And one more thing i had to do is submitting the name field which is basically used for querying the table.