7 Replies Latest reply on Apr 29, 2011 8:55 AM by philmodjunk

    Variables .. Global vrs Local

    MstrPBK

      Title

      Variables .. Global vrs Local

      Post

      Forgive me for the poor use of terms.  I know that communties like this can be picky about how one refers to things.

      I have a database that has two interally related subdatabases.  I am having problems doing comparitive data from one to tangent by user $$variables.  When directed to accept the data in one the data viewer sees the data.  When the database shifts to the other the data vanish and the variables are seen as nul data.  What might be causing this?

      This is a first draft project ... I am trying to construct a soiution to manage a multipul choice quiz randomizing both the order of a selfected block of questions. AND the order of the optional answers.  I simply memorize things to well.

      I do not see a means ot attache a clone of the file here but would be willing to show what I have completed so far in the hopes of finding an answer.

      Pete Kelley, St. Paul, MN USA

        • 1. Re: Variables .. Global vrs Local
          philmodjunk

          Yeah, terms make a big difference here.

          Your "subdatabases" are two different files or groups of files? Global variables only exist as part of a given file and only as long as the file is open for the current user. They cannot be accessed from another file.

          You'll need to find a way to pass the data from one file to another. (Script parameters are easiest for this) or add a table occurrence to a table from file 1 in Manage | Database | Relationships for file 2. Then you can use the relationship to refer to fields in this table directly. You can also create a table of global fields (not variables) in file 1 and point your table occurrence in file 2 to this table so that you can then refer to the global variables from any layout in either file.

          • 2. Re: Variables .. Global vrs Local
            MstrPBK

            Sorry for not getting back to this sooner.  Needed to put my thoughts together.  The apporximate diagram for this is:

            Database: Quiz

            • Table: Questions
              • Layout Development
              • Layout TestFormat
            • Table: Answers
            • Table  Red Herrings
            • Table: Results

            I find it odd that when I have a portal between tables I can hand feild data off to user $$variables and move them to another table feilds or evaluation; BUT when there is no partal the hand off can not occur nor can the user $$variable be evaluated in scripts.  I find this a tremondouls weakness in FileMaker.

            Unless some one else has thoughts on this I am going off to rewrite this - yet again.  I ought to be studying these quieston for a Exam but I am being held bacl fighting language protoco.

            Pete Kelley  St. Paul, MN USA

             

            • 3. Re: Variables .. Global vrs Local
              philmodjunk

              I find it odd that when I have a portal between tables I can hand feild data off to user $$variables and move them to another table feilds or evaluation; BUT when there is no partal the hand off can not occur nor can the user $$variable be evaluated in scripts.  I find this a tremondouls weakness in FileMaker.

              Something's not right here. You can indeed hand field data off to variables (I do that all the time) and no portal or any kind of relationship is needed as long as you stay within the same file (A file can contain any number of tables). The only limit here is when you need to send the data to a different file, then you have to use other means and I've listed several in my last post.

              • 4. Re: Variables .. Global vrs Local
                MstrPBK

                I agree something is not right.  And with the relationship of variables; be they defined or user variables; it should have worked.

                I spent about 1.5 hours taking a new aproach and it seems to be working at this point.  Have two more scripts to clean-up and I can begin final testing this evening (i hope; 10 days behind in studying because of this).

                The fact that the other approach is not working is very very bothersome to me.  I still wish i had an one-on-one mentor in the Twin Cities area (Minnapolisi/St. Paul) to halp deal with these 'frustartions' and learn faster.

                Peter Kelley, St. Paul, MN USA

                • 5. Re: Variables .. Global vrs Local
                  philmodjunk

                  You never clarified this point: Are your two "subdatabases" tables in the same file or different files?

                  • 6. Re: Variables .. Global vrs Local
                    MstrPBK

                    UTTERLLY FED UP and I am probablu loosing my mind!

                    I have gone from not being able to pass vaciables (user or defined) between tables  to ..,  LOOSING ENTIRE TABLES OF DATA FROM JUST IMPORTING DATA TO SECOND TABLE.  THIS IS INSANE.  IS THIS THE DEVELOPERS WAY OF SAYING USE FM11 ... USE FM11 ... USE FM11.

                    Peter Kelley, St Paul, MN USA

                    A previously please FMP Original,2,3,5,7,8,9,and 10 user

                    • 7. Re: Variables .. Global vrs Local
                      philmodjunk

                      I'm afraid it's difficult to suggest much without knowing a lot more about your system and exactly what you did and are trying to do here.

                      Never answered my last question though I've asked it twice. When you are attempting to move data from one table to another are the tables in the same file or two different files?

                      It's a key question and your answer determines any suggestions I might make in how to resolve the issue.

                      Your disappearing data after import opens up a whole new range of possible issues. You'll need to spell out in detail what you did and what happened if you want help with figuring this out.

                      We use FileMaker 10 in a multi-file system here that includes nightly run scripts that use Import Records to move data around with no trouble (and works exactly the same what it did in FileMaker 3) so it can be done effectively and Filemaker 11 offers no new features in any of the areas you describe.