3 Replies Latest reply on Apr 9, 2013 4:27 PM by Johnny98

    Session State Item Values not being used in Page Redirect

    Johnny98
      Hello,
      I have a Page Item P7_PERIOD that I set the session state value for on the click of a button. I can confirm that the value for P7_PERIOD is set correctly in session state after the button is clicked. When I try and use P7_PERIOD to set the value for an item in another page (P17_PERIOD) on the click of another button, it does not recognize the new session state value.

      For the second button, I am telling it to "Redirect to Page in this Application" to Page 17
      Set these items: P17_PERIOD
      With these values: &P7_PERIOD.

      P7_PERIOD has the correct values in session state, but passes the old values to P17_PERIOD on the click of the second button.

      Any suggestions are greatly appreciated.
      Thanks,
      John
        • 1. Re: Session State Item Values not being used in Page Redirect
          Howard (... in Training)
          Johnny,

          I'm not sure how that page transfer works.

          Question: Do you display P17_PERIOD on the page -- does it have the correct value? Is just the Session State wrong -- in that it's the old value? If so, then the values is passed but P17_PERIOD has not been placed in the Session State yet. (I find these "lag" (old value!) problems annoyingly baffling sometimes.)

          Howard

          Edited by: Howard (... in Training) on Apr 9, 2013 11:46 AM
          • 2. Re: Session State Item Values not being used in Page Redirect
            fac586
            Johnny98 wrote:

            I have a Page Item P7_PERIOD that I set the session state value for on the click of a button. I can confirm that the value for P7_PERIOD is set correctly in session state after the button is clicked. When I try and use P7_PERIOD to set the value for an item in another page (P17_PERIOD) on the click of another button, it does not recognize the new session state value.

            For the second button, I am telling it to "Redirect to Page in this Application" to Page 17
            Set these items: P17_PERIOD
            With these values: &P7_PERIOD.

            P7_PERIOD has the correct values in session state, but passes the old values to P17_PERIOD on the click of the second button.
            Redirects are performed in the browser using URLs generated during page show processing. That means that the redirect URL for the second button uses the value of P7_PERIOD as it was during page show, not as it is in session state after being set by the first button.

            The second button should perform a submit and branch to pick up the new value of P7_PERIOD. If there is page accept processing that should not be performed when this button is clicked, use a branch point prior to execution of these processes (e.g. On Submit: Before Computation), or make the processes conditional on other buttons.
            • 3. Re: Session State Item Values not being used in Page Redirect
              Johnny98
              Thank you! Performing a Submit and then a Page Redirect worked.