5 Replies Latest reply on Apr 25, 2013 10:06 PM by moogie

    use of different functions in script

    moogie

      Title

      use of different functions in script

      Post

           fm 12  what is the difference

           1  -  "go to record....first" and then using the "if" function to specify what records you want

           2 -  "enter find mode" to get the records

           is one better then the other ???  just want to copy and paste from one file to another file 

        • 1. Re: use of different functions in script
          schamblee

               Goto record first,will go to the first record in table or the first record in a found set..  I seen and have used go to record next used in a loop.

               I don't a meanful way to use an if statement with goto record. 

               Enter find mode, just enters the find mode.  If you want to find a record you set field(s) with the information you want to find (in find mode) and then perform the find.   You are return a found set, this could be 0 to whatever number of records that matches the find. 

               It depends on what you are doing, which function you use.

               Usually you would use find to find a record.

                

          • 2. Re: use of different functions in script
            philmodjunk

                 If each of your records were a 3x5 card in a stack of the same. A found set would be the group of records you pull from the stack in order to see and work with the data recorded on them. Maybe you want to see all cards where City = "Modesto" or something so you perform a find for all records where "Modesto" is the text in the city field.

                 If, on the other hand, you take that stack of "Modesto" cards and just flip through them one at a time until you find the first card that has "Fred" in the First name field, you are doing something very similar to using a script with Go to Record to loop through the records in your found set. It doesn't change what records make up your found set, it just changes which record is the current record in that found set.

                 So Use find, Show All Records, Show Omitted Only, or go to related record to pull up different found sets. Use a script with go to record to move from record to record within the found set you have just produced.

            • 3. Re: use of different functions in script
              moogie

                   FM12    Im used to an old database software called DataEase -  probably the reason im having problems with FM scripts  -    it doesnt have a "find" function  -  when you want to change a record with specified paramaters you use "if" and it changes specifid records until all records searched  -  does FM need to search records with the "Find" function and then change found records or would it be the same with "if"  -     i might understand useing "find" if different record manipulations was needed  -  or is it just out of habbit in the FM community that "find" is used

              • 4. Re: use of different functions in script
                philmodjunk

                     I think you need to spend some time learning how FileMaker works. FileMaker layouts are built around the concept of a found set. It's roughly similar to the "record set" used in many other systems but more easily manipulated by the user.

                     You could use Replace field contents with an if function just like you describe but performing a Find and then using Replace Field Contents on the smaller found set thus produced will be quicker.

                • 5. Re: use of different functions in script
                  moogie

                       FM 12  -  agree i dont have grasp of FM scripts   -  ive tried getting aquainted with FM help but it doesnt explain as well as your last sentence  -  thanks response very helpful