3 Replies Latest reply on Mar 25, 2010 12:46 PM by Sunny1

    Button Script Question



      Button Script Question


      I have a form of public school detail with a button that when pressed would open up a new record of another form to record detail about a program participant.  I would like to insert the school name from the previous form into the program participant form.  How do I write the script to do that?


      I am using filemakerPro 10.  Thank you in advance for your help.

        • 1. Re: Button Script Question

          Set Variable [ $School ; Value: YourTable::YourSchoolFIeld]

          Go To Layout [//specify your second layout]

          New Record/Request

          Set Field [YourlayoutTable::YourSchoolField ; $School]

          • 2. Re: Button Script Question

            I think I must be doing something wrong because I can't get it to work.


            If Layout number 1 is called Pub School Form and Layout 2 is Prin4aDay.


            The school name on Form 1 is in table Public Schools and the field is SchoolName.


            The field in Layout 2 is in Table Guest Prin and the field is GSchool.

            Can you apply your response with those names because no matter which way I do it, it is not working.


            Also, when I do button set-up, is it to Perform Script and then choose the name of this script? 


            Thank you for helping me.

            • 3. Re: Button Script Question

              Nevermind.  I got it to work.  Thank you so much!