8 Replies Latest reply on Jan 27, 2011 7:37 AM by Terri

    General question: Difference between "Calculation" and "Auto enter calculation"

    Meulendijk

      Title

      General question: Difference between "Calculation" and "Auto enter calculation"

      Post

      From a reply to an earlier post I learned that a Calculation is not the same as an Auto Enter Calculation. 

       

      What exactly is the difference, as the formula used is exactly the same.

       

      Jan Meulendijk 

       

       

        • 2. Re: General question: Difference between "Calculation" and "Auto enter calculation"
          Meulendijk
            

          Thanks, comment! Saved me paging back a few years.

           

          Jan Meulendijk 

          • 3. Re: General question: Difference between "Calculation" and "Auto enter calculation"
            DickK

            I'm brand new to FileMaker, have Pro version 10, and have spent the day trying to understand why I was getting different results when using Calculation vs Auto-Enter Calculation. Specifically, when I changed one of the calculation parameters in the equation using Calculation the results field changed as it should. However, changing the same parameter in the Auto-Enter Calculation left the results field unchanged. I followed the past discussions and now know there is a difference. But that raises a larger question for me.

             

            Say I created an extensive data base with some of the fields based on an Auto-Enter Calculation because I wanted the results field to be a text field. Now after all is and done I find that either I made an error in the original calculation or have to change one of the parameters in the equation.

             

            How can I recalculate all those results fields to reflect the new parameters?

            • 4. Re: General question: Difference between "Calculation" and "Auto enter calculation"
              philmodjunk

              Are all the fields referenced in the calculated expression from the same table as the field you are updating?

               

              If s,o simply modify the calculated expression. If "Do not replace existing result..." is checked, clear this check box. Now click OK to dismiss each dialog and exit Manage | Database. The fields should update automatically. If you don't want the "do not replace..." option cleared during normal use of the database, go back and re-select it no that you've updated your calculation.

              • 5. Re: General question: Difference between "Calculation" and "Auto enter calculation"
                DickK

                Phil,

                 

                Everything is in the same table. It's a very simple table I'm using to try to figure out what is happening. I can't get it to work even with unchecking of the Do No Replace box.

                 

                I have fwo fields, Number and Result. In the number field I input a number. The Result field is an Auto-Enter Calculation field set to the number format. The Result field is the following equation: Result = 2*Number. In the Browse mode if i input  any number in the Number field the Result field shows the proper calculation i.e. 2=2*1, 8=2*4. It works for all the records that I have created. Now if I go back to the equation and change it to Result=3*Number and look at all the records that were in created prior to this change the Result field hasn't changed - that is - it shows the calculation based on the multiplier 2 not 3.

                 

                I think others who have addressed the issue have come to the same conclusion. Hope I am wrong.

                If I'm not wrong I'm looking for a way to easily correct all the records with an incorrect result.

                 

                **bleep**

                • 6. Re: General question: Difference between "Calculation" and "Auto enter calculation"
                  philmodjunk

                  Darn, that is a difference between the two options for a calculation.


                  We need a triggering event to force the field to recalculate.

                   

                  Let's say you have three fields, A, B, and C referenced in your calculated expression.

                   

                  FInd a layout where one of these fields is visible. Let's pick "A" for our example.

                   

                  choose Show All Records

                  Click in the field and select Replace Field Contents from the Records Menu

                  Choose the calculated result option and select field A as the calculated result. (This replaces the field with the same value already stored there.)

                  Perform the replace and any calculated data fields that refer to field A should recalculate--if the do not replace options is not selected.

                  • 7. Re: General question: Difference between "Calculation" and "Auto enter calculation"
                    DickK

                    Phil,

                     

                    That's a big WOW!!! for you.

                     

                    You know your stuff.

                     

                    Thanks a million. I never would have figured that out and from my searching in this forum I never came across that answer.

                     

                    If I knew how to give you a super cudo I would do it.

                     

                     

                     

                    **bleep**

                    • 8. Re: General question: Difference between "Calculation" and "Auto enter calculation"
                      Terri

                      HI Phil,

                      I think this is related to my issue I posted yesterday and today, but let me bring the issue to this discussion. I have a Master field that has a date in it. I want field 1 to equal the automatically calculated date of two days after the master field (your calculation formula completed this action). But I need to be able to override the date in field 1 when necessary. It looks like in order to do that I need to use the auto-enter option rather than the calculation field. 

                      However, if I need to change the date in the Master field, I need it to automatically calculate field 1. Based on this post, it looks like I need to take the steps of replacing the field contents for the Master field. 

                      Problem*** I only want it to update for that record, not all records.

                      I have a feeling I'm getting into script territory with this. But we are talking about not just field 1, but 13 fields, so I would have to do a loop which, quite frankly, scares the heck out of me.

                      So what is the best option?