5 Replies Latest reply on Dec 18, 2009 1:49 PM by TSGal

    Copying fields between Tabbed Panels

    CoolGerry

      Title

      Copying fields between Tabbed Panels

      Post

      First Posting experience.  I have searched the message board and not found anything that fits my problem, so here goes.

      I am working in FM Pro 10 in a Windows XP environment.  I practically know nothing about creating scripts.

       

      The first entry to the database will be at Contact Names.  The first Tab is called Contacts and it is on this tab panel that the

      relevant contact information will be entered.  However, Contacts may also be a Donor, a Volunteer, a Sponsor or a

      Subscriber.  A Contact may be one or more of these categories. So, I have set up a Tabbed Panel for each of these categories

      with similar fields as found on the Contact Tab.  

       

      I would like to be able to 'Click a Button' on the first Contact Panel that results in the contact information being copied over to

      the Donation panel, if the contact becomes a donor.  If they also become a Subscriber, then a similar script would copy the

      data over to the Subscriber panel.

       

      I have found recommendations to use Set Field but when trying this, the value looks to access another layout.  Given that I

      am using a panel approach, the option to select the destination is not available.  

       

      Hope I am making sense here.  If not, please ask any questions!

      Many thanks!

       

      Gerry

        • 1. Re: Copying fields between Tabbed Panels
          raybaudi
            

          Hi Gerry

           

          I'm sorry but, even if it is easy to make what you want, really you do not need it.

           

          The Contact table must contain ALL you contacts and a simple checbox field for your categories.

          In other words there is no need to copy the same data to other fields of the same DB.

          • 2. Re: Copying fields between Tabbed Panels
            CoolGerry
              

            Hi Daniele,

             

            Brilliant!  I clearly was over-complicating the db and couldn't see the obvious!

             

            If I create check boxes that identifies the contact as belonging to one or all of the categories, can I create a report

            that pulls out all contacts belonging to Donation?   If so, would you mind helping me out with how to do that?

             

            Many thanks!

            Gerry

            • 3. Re: Copying fields between Tabbed Panels
              TSGal

              CoolGerry:

               

              Thank you for your posts.

               

              Yes, you can "create a report that pulls out all contacts belonging to Donation".

               

              1. Pull down the View menu and select "Find Mode".

               

              2. Put a check into the checkbox for Donation.

               

              3. Press Return.  This finds all records where Donation is checked.

               

              At this point, you can go to a layout used for reporting purposes.  If you have not yet developed a report, try the following:

               

              1. Pull down the View menu and select "Layout Mode"

               

              2. Pull down the Layouts menu and select "New Layout/Report..."

               

              3. For layout type, select "List/Report" and click "Next"

               

              4. Leave the default of "Columnar list/report" and click "Next"

               

              5. Move the fields from the left side to the right side that you want displayed in your report.  Click "Next".

               

              6. Do not sort at this time, so click "Next"

               

              7. For Layout theme, select Standard or Default.  Click "Next"

               

              8. For Header and Footer information, leave it alone and click "Next"

               

              9. Do not create a script and click "Next"

               

              10. View the report in Browse mode and click "Finish".

               

              You should now see a list of contacts in a list type report.  You can print from here, modify the current layout, or create a new layout.

               

              If you need clarification for any of the above steps, please let me know.

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Copying fields between Tabbed Panels
                CoolGerry
                  

                That's great!  I can create the report by following these steps. Thanks.

                Is there a way to transfer these steps into a script that I can attach to a Button?

                 

                Gerry

                 

                 

                • 5. Re: Copying fields between Tabbed Panels
                  TSGal

                  CoolGerry:

                   

                  Yes, now that your report layout is created, you can create a script that will automatically switch to this layout with the find criteria.

                   

                  From the Scripts menu, select "Manage Scripts..."   In the next dialog box, click the bottom left icon "New".  Name the script "Donation records to print" (or whatever makes sense to you.).  On the left side of your window are the script commands.  Create the script commands so it says:

                   

                  Perform Find [ Restore ]       NOTE: here is where you enter the criteria for a checkbox in Donation

                  Go to Layout [ <name of your report layout> ]

                  Print

                   

                  You can leave off "Print" if you just want to view.

                   

                  When finished, save it.

                   

                  Go to your original layout, pull down the View menu and select Layout Mode.  Use the rectangle tool to create a rectangle that will be used as a button.  After you draw the rectangle, there will be four handles on each corner of the rectangle.  Pull down the Format menu and select "Button Setup...".  You want to select "Perform Script" and then select "Donation records to print" (or whatever you named it).  Click OK, return to Browse mode and click the button.  The script will run.

                   

                  Let me know if you run into any difficulty.

                   

                  TSGal

                  FileMaker, Inc.