Announcement

Collapse
No announcement yet.

Global variables VS Session variables

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Global variables VS Session variables

    Good day to all

    Looking at the documentation it seems ( MUST ) that there is a difference in how to define "global variables" and "session variables" in Scriptcase.
    A "session variable" is defined SESSION to share it among all applications in the same session as a "global variable" is defined as POST/GET to use it as a parameter when calling a form or grid from another one.
    This makes me think that if I change the value of a "global variable" running an application this should not be passed to the applications of the same session as if it were a SESSION variable.
    But this is what happens.
    I use "global variable" as a filter during "capture links" but after that if i run the same grid directly from menu the "global variable" maintain the old value.

    A workaround would also to be able to define parameters using the variables associated to the {field} on the screen without it being necessary to define temporary variables just for this. But this is not possible. Only GLOBAL/SESSION variable or fixed values are allowed.

    How can i define a GLOBAL variable that don't work like a SESSION variable?

    Thanks.

    Giorgio Bravi
    Giorgio Bravi
    Dolphin Software & Thinkware
    www.dolphin.it

  • #2
    As a workaround i solved using sc_reset_global([Global_Variable1], [Global_Variable2] ...) in menu event ( onExecute ) just before calling any application.
    Giorgio Bravi
    Dolphin Software & Thinkware
    www.dolphin.it

    Comment


    • #3
      Hello,

      Noticed their difficulty, but global variables are in session for the upcoming applications (no matter how many).

      Your solution is correct, but a little difficult, depending on how many applications have in your project.

      I will be sending it your suggestion, but I can not assure you that any assistance may arise in relation to temporary variables for fields.

      Thank you for your solution.
      Best regards,
      Thomas Soares.
      ScriptCase International.

      Email: t.soares@scriptcase.net
      Visit our Blog: http://www.scriptcase.net/blog/
      Visit out fan page: http://www.facebook.com/Scriptcase

      Comment

      Working...
      X