6 Replies Latest reply on Mar 15, 2009 7:06 AM by carlz_1

    Calculation issue

    carlz_1

      Title

      Calculation issue

      Post

      Using Filemaker Pro Advanced 10

       

      I have a calculation field that was expect to recalculate every time I changed one of the variable. Now, when I change a variable the field does not change immediately.  If I go to a different layout and then come back to the original, the calculation that did not appear before, does now.  I would like it to be immediate.  The field is called MNA_needs, it is an unstored, calculation field.

       

      thanks for any advice, once again.

        • 1. Re: Calculation issue
          obeechi
             Maybe you need a refresh step in a script ... Is this field being changed from within a portal?
          • 2. Re: Calculation issue
            carlz_1
               No, its not in a portal.  However if I go to that field and click the mouse on it, it will recalculate then and show the correct mathematical answer.  I would like it to be automatic.  It used to.  Something I changed caused a problem...
            • 3. Re: Calculation issue
              Jade
                 Are any the fields involved in the calculation Summary fields?
              • 4. Re: Calculation issue
                carlz_1
                   No, I've never used summary fields.  I did notice today that when I first go to that layout and change a field that is involved in the calculation, the calculating field does change.  When I try to change the field involved in the calculation, the calculating field does not change until I go to that field and click my mouse on it.
                • 5. Re: Calculation issue
                  obeechi
                    
                  Under the Records menu, if you choose Refresh Window, does that cause the calculation to recalculate? Curious to know.
                   
                  Also, if you define each field the calculation refers to, to be an 'Auto Enter' 'Calculated Value' (where 'Do not replace existing value of field' is de-selected) specified as 'trim (self)', does that help?
                   
                  Trim() prunes off any extra spaces, like "  hi" becomes "hi" after you enter the field. 'Self' here, means that Trim() is referencing the same field the 'Auto Enter' is defined for (so you can just copy this calculation and paste it into the other field's 'Auto Enter' area ). Even if you have no extra spaces, the trim() calculation is run each time you leave the field, and this can cause your main calculation to calculate. Does this help?
                   
                  I forget, but isn't there an issue when a calculation references a related field? (not sure if you're doing this ...) 
                  • 6. Re: Calculation issue
                    carlz_1
                       Thanks for the Refresh tip.  To cure the issue, I inserted a trigger for each field involved in the calculation an OnObjectSave script which is nothing more than Refresh Window.