Announcement

Collapse
No announcement yet.

How can a global variable be missing when I just typed it in?

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

  • How can a global variable be missing when I just typed it in?

    I'm receiving the message "The following global variables are missing:" on a new form I've created.

    The global variable is expected be cause I'm using it in the WHERE clause. The global variable is set to "SESSION" and "IN".

    I've done this dozens of times in the past few days.

    I've cleared my cache, restarted the browser... What could this be?
    Ed

  • #2
    Solved: So I tried different browsers, rebooted the PC. None of these work.

    The problem was fixed when I changed the name of the global variable from [event_id] to [EventId].

    I'd still like to know why. Hope this helps someone else.
    Ed

    Comment


    • #3
      Maybe a field had the same name?
      /Giuseppe

      Professional Scriptcase Services
      Some Customers opinions

      Comment


      • #4
        I spoke too soon. The new variable name started doing the same thing.
        I like scriptcase, but some of these problems that don't make sense and are hard to debug are driving me crazy. I've been in software development for 25 years and know all platforms have their weaknesses, but it's still very frustrating.
        Ed

        Comment


        • #5
          Need to be more clear on that. I'm the last to deny the issues on scriptcase, but I'm a very experienced developer and I don't recognize this. As Giu said, if you create globals then do not use the same name as on the fields and do not declare php variables of the same name.
          Albert Drent
          aducom software netherlands
          scriptcase partner, reseller, support and (turn-key) development
          www.scriptcase.eu / www.scriptcase.nl

          Comment


          • #6
            Humm. Are you saying there are global variable naming conventions? If so, I wasn't aware of that, could you give more explanation?
            Ed

            Comment


            • #7
              There are no real conventions, just that [var] names are translated to $this->var and $var can be translated the same way as {var} will . That's why you should avoid using the same name. That's why most samples use [glob_myvar] in stead of [myvar] for instance.
              Albert Drent
              aducom software netherlands
              scriptcase partner, reseller, support and (turn-key) development
              www.scriptcase.eu / www.scriptcase.nl

              Comment


              • #8
                I will adopt that pattern. Thanks
                Ed

                Comment


                • #9
                  I don't believe it. I changed my global variables to be different than field names, as you suggested and my grid is working.
                  Thanks a million.
                  Ed

                  Comment

                  Working...
                  X