2 Replies Latest reply on Jun 2, 2009 11:37 AM by TSGal

    Transfer fields to diff. layout

    germ

      Title

      Transfer fields to diff. layout

      Post

      If I have a lot of fields to move from a layout to another with a Script botton is there an easy way instead of copy and paste all of them one by one in the script.

        • 1. Re: Transfer fields to diff. layout
          LaRetta_1
             We cannot advise with limited information.  Please provide the context and purpose here.  Some information we need to know:  What is the table you want to copy data from?  What is the table you want to copy data to and why?  Usually, with a good structure, there is simply no need to copy data from one place to another; you would instead relate the data-sets and refer to them through the relationship.
          • 2. Re: Transfer fields to diff. layout
            TSGal

            germ:

             

            Thank you for your post.

             

            Besides the reply from LaRetta being correct (Thank you!), it sounds like you are copying and pasting via a script.  Instead, you may want to use "Set Variable" script step.  Here is a simple example of taking four fields (Name, Address, City, and State) and transferring the information to another layout.

             

            Go to Layout [ <layout where initial table is located> ]

            Set Variable [ $name ; <initial table>::Name ]

            Set Variable [ $add ; <initial table>::Address ]

            Set Variable [ $city; <initial table>::City ]

            Set Variable [ $st ; <initial table>::State ]

            Go to Layout [ <layout where second table is located> ]

            Set Field [ <second table>::Name ; $name ]

            Set Field [ <second table>::Address ; $add ]

            Set Field [ <second table>::City ; $city ]

            Set Field [ <second table>::State ; $st ]

             

            ============

             

            This will help you from switching back and forth between layouts and copying and pasting one field at a time.

             

            Please let me know if you need clarification for any of the above steps.

             

            TSGal

            FileMaker, Inc.