3 Replies Latest reply on Mar 3, 2009 9:53 AM by comment_1

    clear repeating fields 1 through 100

    Dajen

      Title

      clear repeating fields 1 through 100

      Post

      I am trying to clear repeating fields 1 through 100. I can get the script to clear field 1 or 2 but not 1-100.

        • 1. Re: clear repeating fields 1 through 100
          davidhead
            

          You have 100 repeating fields??? Why?

           

          If you have FileMaker Pro 10 and have used some kind of incremental naming convention for the fields, I am sure you could do this with a looping script and the Set Field by Name script command. 

          • 2. Re: clear repeating fields 1 through 100
            Dajen
               I have 100 repeating fields because that is the only way I know how to make a time sheet to log our hours on a project. I looked at one of the templates that comes with filemaker and used that as my guide. I will look into the Set Field by Name script command.
            • 3. Re: clear repeating fields 1 through 100
              comment_1
                

              I think you mean 100 repetitions of one field, no? They can be cleared by a looping script such as:

               

              Loop

              Set Variable [$i ; $i + 1 ]

              Exit Loop If [$i > 100]

              Set Field [RepeatingField[$i]; ""]

              End Loop

               

              However, the sooner you replace the repeating fields by a portal to a related table (where each individual entry is a separate record), the better. FMI should be ashamed of themselves for providing this template in the first place, and doubly so for still keeping it with version 10.