5 Replies Latest reply on Oct 4, 2011 11:27 AM by philmodjunk

    Global Fields and Home Pages



      Global Fields and Home Pages


      I have been digging through every post I can to try to understand global fields and their use but I feel as though I am not getting something in the grander sense of it all. I understand that the global fields are available to all layouts and that they temporarily hold data for that specific user while they are in the program and then the data returns to its set value from the host. Am I missing anything in this?

      From here I am not sure of what to do with some of these things. I am trying to create a start page for my solution that will allow users to jump to specific layouts to accomplish their goals, but as much as I dig into this idea I am apparently not searching for the correct terms or I am just not finding what I am looking for. Is there a write up somewhere that could help me set up this style page that would allow users to click buttons to take them to specific layout (I am guessing this is just a button setup), but are there global fields I need to set up for this type of functionality and if so what? I am quite confused on the actual implementation of globals.


      Thank you for your time and help!


        • 1. Re: Global Fields and Home Pages

          I'm not sure what role a global field would play here.

          Say you have two layouts: "Products" and "Invoices" and you want a button on Products to take the user to the Invoices layout.

          In button setup, you can specify the "Go To Layout" option and then select "invoices" as the layout this button takes the user to.

          You won't need a global field unless you want to set up your own drop down list or pop up menu of possible layout destinations--in which case you can use a script trigger on the field to perform a script that uses the selected value to determine what layout to change to and you do not need any button at all unless you are using an older version of FileMaker that does not support script triggers or IWP which also does not support triggers. The drop down or pop up configured field would almost always be set up as a global field here.

          With such a value list controlled system, you might also add a "back" button and then you could use a global VARIABLE to keep track of the previous layout name or number so that a "back" button could mimic a browser's back button function and take the user back to their previous layout by performing a script that uses the value in this global variable to return to the correct layout.

          • 2. Re: Global Fields and Home Pages

            Phil you are amazingly on top of all of everything, thank you for such a quick response.

            Your response makes complete sense. So then to clarify, I can make a layout that would be a basic landing page for all users with navigational buttons to different layouts they would need access to with script triggers and buttons and never need a global field to make it function. Would this landing page layout need to be connected to any of my tables in any way? I think this is where I am getting tripped up, everything else needs a connection of some sort...



            • 3. Re: Global Fields and Home Pages

              All layouts need to refer to some table in your system via a table occurrence you select in Show Records From. The specific table occurrence could be to any table in your system if the layout is all buttons and global fields. I sometimes have a table of only global fields that I select for such a layout.

              • 4. Re: Global Fields and Home Pages

                That seems to me what I am wanting to attempt, but I am unsure of how to proceed with the global fields.

                I currently have a fee allocation system that has the following tables:

                Instructor (names, emails, etc)

                Courses (names of courses, course numbers, area, lab fees, etc)

                Sections (the table where the course and instructor are joined)

                AreaFunds (join table of area and instructors)

                I have some users that are set for only Section access and some set for Section and Area. I am trying to create a common start page for everyone and allow them to see portals connected to just their sepecific courses and/or area funds. Concidering these are seperate tables how could I accomplish this? I am hoping that there is a way to use the login name as the filter for the portals. Is this a case where Global fields would be needed? I hope I have provided enough information for your assistance.

                Thank you again.


                • 5. Re: Global Fields and Home Pages

                  Buttons that change layouts are one issue. Portals that display different lists of records for different users are a different issue.

                  It would seem you have these relationships between your tables:


                  If you include the account name for each user in the Instructor table a script that runs when the file is opened can use get ( AccountName ) to perform a find on the Instructor table to find the matching Instructor layout. If you then base your start page layout on Instructor, this should make it possible to show only the Sctions, courses, AreaFunds and/or Areas related to that one Instructor record.

                  Record level access control can be set up so that records for other instructors are not accessible if you want. See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a detailed description of how to set this up.