3 Replies Latest reply: Jul 16, 2013 9:28 AM by jrimblas RSS

    Page Item Values in Confirm




      I have a form with 4 page items, just simple text fields, and I would like a confirm message to be able to display their values after a user clicks submit but before the everything is actually submitted. I have the confirm dialog pop up but all the page item values are blank, if I hit OK then it gets submitted and uploaded successfully so I know it's working correctly. So is there a way I can capture the values and display them before submit?



        • 1. Re: Page Item Values in Confirm

          It would be useful to see the code you have I place to give you a better answer.

          To get a item value use something like this:



          Build your message by concatenating your string with the output of the v$ function.

          apex.confirm("Is " + $v("Pn_ITEM") + " the value you want?", "SUBMIT");




          • 2. Re: Page Item Values in Confirm

            Sorry I was in a rush when I posted it, here is my code so far:


            4 page items, all are simple text fields:





            2 buttons:

            Cancel - takes you back to page 1

            Finish - calls dynamic action


            2 dynamic actions:




            In Confirm the settings/text area has this:

            you will be submitting these parameters:



            hostname - &P1115_HOSTNAME.



            inst_name - &P1115_INST_NAME.

            hostname - &P1115_HOSTNAME.

            db_id - &P1115_DB_ID.



            db_id - &P1115_DB_ID.

            db_name - &P1115_DB_NAME.


            So any idea on how to pass a typed value before submit?

            • 3. Re: Page Item Values in Confirm

              Ok, I see the problem.  This gets really convoluted with DA because &P1115_HOSTNAME. doesn't have a value in session state until you submit.  You could do some "Set Value" true actions before the Confirm, but it may still not work the way you want it too because this message gets composed client side.


              So, here's a solution without DA.  Change your button's Action from Defined by Dynamic Action to Redirect to URL.

              Use code like this:

              javascript:apex.confirm("Is this the correct hostname: " + $v("P1115_HOSTNAME") + "?", "SUBMIT");

              Your message can be whatever you need and the SUBMIT is the actual request value for the button. So if you need SAVE use that, etc...


              Now, I'm wondering if all that text is exactly what you want in your confirm message?  If so, you can use \r for new lines.

              javascript:apex.confirm("HOST\rhostname - " + $v("P1115_HOSTNAME") + "\rORA_INST\rinst_name - " + v$("P1115_INST_NAME") + "...more stuff....", "SUBMIT");