4 Replies Latest reply: Dec 28, 2012 3:16 PM by will213 RSS

    Navigating Back to Calling Page

    will213
      Hello,

      I'm using APEX 4.1.1 and here is my dilemma: I have 2 pages A and B that both navigate to page C. In page C, when "Apply Changes" button is clicked I need to navigate back to either A or B depending on which page made the call to C. For pages A and B, I have set the "Request" value in the "Link Column" section to uniquely identify which page is making the call. Then, in page C I have created 2 branches (one to A and one to B) with condition "Request = Expression 1" where expression 1 is the value I assigned in A and B. When page C loads, I can see the value I assigned in the URL, but when I click "Apply Changes" the page submits and remains on page C.

      Any help with this is greatly appreciated.

      Thanks,

      Will
        • 1. Re: Navigating Back to Calling Page
          VC
          user9130472 wrote:
          Hello,

          I'm using APEX 4.1.1 and here is my dilemma: I have 2 pages A and B that both navigate to page C. In page C, when "Apply Changes" button is clicked I need to navigate back to either A or B depending on which page made the call to C. For pages A and B, I have set the "Request" value in the "Link Column" section to uniquely identify which page is making the call. Then, in page C I have created 2 branches (one to A and one to B) with condition "Request = Expression 1" where expression 1 is the value I assigned in A and B. When page C loads, I can see the value I assigned in the URL, but when I click "Apply Changes" the page submits and remains on page C.

          Any help with this is greatly appreciated.

          Thanks,

          Will
          Create a hidden item on page c lets say PX_FROM_PAGE.

          Create an unconditional branch/edit one existing on page c and set the target page to *&PX_FROM_PAGE.*

          Now when you call page c from page a/b include the parameter PX_FROM_PAGE with relevant page number. Example when calling page c from page a include the PX_FROM_PAGE to the call with page no of a

          Thanks,
          Vikram
          • 2. Re: Navigating Back to Calling Page
            will213
            Thanks for the response Vikram.

            I was able to create the hidden item PX_FROM_PAGE on page C and set it equal to the page number of the calling pages A/B; I even verified this by changing the item to "Display Only" so I could see that the value was indeed being set correctly. But when I changed my branch to be unconditional and set the target page to be @PX_FROM_PAGE and I click "Apply Changes" I'm getting a 400 error because the literal string "@PX_FROM_PAGE" is being populated in the URL and not the actual page number value (f?p=105:*&PX_FROM_PAGE*:717601583948201::NO:::).

            Any ideas what I could be missing?

            Thanks,

            Will
            • 3. Re: Navigating Back to Calling Page
              fac586
              user9130472 wrote:

              I was able to create the hidden item PX_FROM_PAGE on page C and set it equal to the page number of the calling pages A/B; I even verified this by changing the item to "Display Only" so I could see that the value was indeed being set correctly. But when I changed my branch to be unconditional and set the target page to be @PX_FROM_PAGE and I click "Apply Changes" I'm getting a 400 error because the literal string "@PX_FROM_PAGE" is being populated in the URL and not the actual page number value (f?p=105:*&PX_FROM_PAGE*:717601583948201::NO:::).
              What is *@PX_FROM_PAGE* ? This has no meaning in APEX. Are you perhaps thinking about Ruby or—heresy—SQL Server?
              Any ideas what I could be missing?
              One very small character. The static text exact substitution method of referencing the value of an APEX item requires a terminating dot ("."):
              &PX_FROM_PAGE.
              (Please update your forum profile with a real handle instead of "user9130472".)
              • 4. Re: Navigating Back to Calling Page
                will213
                What is *@PX_FROM_PAGE*? This has no meaning in APEX. Are you perhaps thinking about Ruby or—heresy—SQL Server?
                My bad; that should have been a "&" not "@".
                One very small character. The static text exact substitution method of referencing the value of an APEX item requires a terminating dot ("."):
                &PX_FROM_PAGE.
                That was it! Thanks so much!!!