6 Replies Latest reply on Jul 27, 2011 8:51 AM by sly_1

    transfering a record



      transfering a record


      Im trying to write a script to do this. I have 2 tables student table an lead table

      Student table has the following fileds

      student name


      postal code

      home #

      lead table has the following feilds

      lead name


      postal code

      home #

      here is what im trying to do

      once the lead actually becomes a student i want to click a button that will xfer all the lead info to the student table and also match teh feilds.

      so lead name = student name

      lead address = student address

      i just have no clue on how to do this

      any help would be great



        • 1. Re: transfering a record

          There are a number of methods that can do this. Import records can import one table's found set into another so a script that isolates the record to be imported in a single record found set and then imports it can do this.

          A series of set variable steps that loads up each field in a variable followed by script steps that change layouts, create a new record and then uses set field steps to copy the values from the variables to the fields of the new record can also do this.

          But why do it at all?

          If you use a single table to store leads and students, you can add one more field and use it to identify each record as either a "lead" or a "student". Then transferring your record is a simple as updating this one field so that it now reads "student" instead of "lead".

          • 2. Re: transfering a record

            ok ivve done that phil thank you.

            But now my leads show up on my student list report.

            so when i petrform any search leads show and i dont want them to do that. so how would i exclude those from those reports?

            • 3. Re: transfering a record

              Perform a find or do a constrain found set that omits the leads from your report's found set.

              There are several generalized techniques that can help you keep your two categories of contact data separate:

              Perform Finds in scripts performed by a script trigger that fires when you first access the layout can include criteria to omit/include one of the two categories.

              Constrain Found Set scripts that omit the undesired category that is performed when you re-enter browse mode script trigger. (This way you can manually perform find without having to remember to exclude a category.)

              Records from this table when viewed in a portal can be filtered by either a portal filter expression (Filemaker 11 only) or a field that is part of the portal's relationship (FileMaker. 3 and later).

              Sort orders in reports that include both categories can group your records and sub summary parts can be set up as "sub headers" to identify each group.

              • 4. Re: transfering a record

                ive tried the constrain fond set and i dont really get it.

                how would i do it


                • 5. Re: transfering a record

                  Constrain found set only works on the records currently in your found set instead of the entire table of records

                  Say you have these records in your found set:


                  If you enter find mode, specify "Apple" and then select "Constrain Found Set" instead of "Perform Find", your found set is reduced to the one record with "Apple". This works the same in a script. If you had used Perform Find instead, you might have produced a found set of several more records if you have additional records with "Apple" in your table that weren't in the found set.

                  • 6. Re: transfering a record

                    thank you so much phil. I really appreciate the help.