3 Replies Latest reply on Jan 6, 2011 8:44 AM by philmodjunk

    create calculations automatically



      create calculations automatically


      Hi all

      My guess is there is some efficient way to do what I am doing by keystroke now.  It's not so bad, but I am betting there is some much faster way, and I wonder what it is.

      Currently I am building a survey solution.  Each survey copy is a record.  The survey requires 50 calc fields that follow this pattern 

      calc1 = answer1a - answer1b,    calc2 = answer2a - answer2b,   ... calc50 = answer50a - answer50b

      Right now I am just creating each calc field, then typing in the calcs one by one.  Is there a way to get filemaker to "see the pattern" and go ahead and create a bunch of sets of fields like this? 

      Thanks in advance.  -Joe

        • 1. Re: create calculations automatically

          In filemaker, there's no way to create a field dynamically, u have to create a field explicitly. And for the calculation, u need to goto manage->database, then autocalculation for each calc1, calc2,... and in "calculation" u can specify calculation ( if(answer1a != "") and if(answer1b!="");answer1a - answer1b;"" ), so u don't need to calculate the value answer1a - answer1b, and so on.

          • 2. Re: create calculations automatically

            Ok, I understand the first part of your answer, but not the second.

            Where are you putting the calc?  What I have done would be less typing unless this calc goes in a single place, or can be pasted into each calc field. 

            • 3. Re: create calculations automatically

              I think you should restructure your database so that you don't have such a large list of dedicated fields. Put each survery response in a separate related record. To add a new survey response, just add a new record.

              If you search this forum using Survey as a keyword, you'll likely find a number of threads discussing surveys managed via FileMaker that go into this concept in much greater detail.