4 Replies Latest reply on Jul 29, 2013 12:56 PM by CourtneyTran

    Alterations to One Layout Causes Changes in Another Layout

    CourtneyTran

      Title

      Alterations to One Layout Causes Changes in Another Layout

      Post

           I've created three separate layouts, one that reports total donations per donor, one that reports total donations per year, and one that reports total donations for each fund we have.

           The problem is, and I don't understand why, when I change the formatting of one of the formats, the other formats change too!

           I am baffled because each of these layouts were created separately. They are not duplicates of one layout that I altered. They were each created one by one, their fields added, etc.

           So, for example, when I alter the "total donations per individual" layout so that it reports donations per individual, my "total donations per year" layout shows total donations per individual as well instead of the way I had originally formatted it to reflect total donations per year. Why is this happening and how do I stop it?

        • 1. Re: Alterations to One Layout Causes Changes in Another Layout
          philmodjunk

               That's because all three layouts list the same Tutorial: What are Table Occurrences? name in Layout Setup | Show Records From.

               The found set that you have, the order in which they are sorted and which record is the current record are all associated with the current table occurrence--not the layout. Thus, any changes made to the found set, such as performing a find or sorting the records, will affect all three layouts in identical fashion.

               There are several options you can consider that would keep this from happening:

               1) Save the "state" of the found set for a given layout in a set of globla variables. You'd save the find criteria and sort order in those variables and the record number of the current record. Use a different set of variables for each layout. When you return to a previous layout, use a script to reference the data in those global fields to restore the found set to it's previous state. Warning: while this is theoretically possible, it could be complex to set up and implement successfully.

               2) When changing layouts, open or select a different FileMaker window. The found sets in each window are independent of each other.

               3) Create duplicate table occurrences of the same window. Specify a different table occurrence for each window.

          • 2. Re: Alterations to One Layout Causes Changes in Another Layout
            CourtneyTran

                 Thank you PhilModJunk. smiley I have decided to do this by creating separate table occurences for each of these layouts.

                 With three separate table occurences for each of three layouts, how do I go about getting the same data into the fields found in each table occurence?

                 For example, layout 1 has fields from the table occurence titled "table 1". Layout 2 has fields from the table occurence titled "table 2". Layout 3 has fields from the table occurence titled "table 3".

                 Each of the tables that correspond to a layout will consist of a field that has donor last name and first name, for instance. How do I get the same data to appear in the fields from separate table occurences?

                  

                  

                  

            • 3. Re: Alterations to One Layout Causes Changes in Another Layout
              philmodjunk

                   Since these are duplicated table occurences, they all refer to the same table. Field 1 is the same field in all three instances, but the reference to that field has to be in terms of the layout's table occurrence or your field object may refer to data from a different record or may generate an error message in the field on your layout.

                   You can use the field tool to add the field and then make sure that you select the field after choosing the "current table" option in the drop down at the top of Specify Fields.

                   You can copy and paste the field from one layout to another if you then double click the copied field object to re-open specify fields in order to re-select the field from the correct table occurrence.

                   And be careful. When you use Layout Setup | Show Records From to select a different table occurrence for an existing layout, fields and portals already placed on that layout do not automatically update. You have to make the needed changes item by item on your layout.

              • 4. Re: Alterations to One Layout Causes Changes in Another Layout
                CourtneyTran

                     Thank you so much! I've been working on this for a while now but officially, thanks to your help, so far I have been able to create buttons that will automatically generate dynamic list-format reports and print them with the information I want.