2 Replies Latest reply on Sep 23, 2011 12:19 PM by donok

    Calculations in portal not updating page

    donok

      Title

      Calculations in portal not updating page

      Post

      I have an invoice database that uses a portal with editable fields (to change item prices on the fly) - the calculations work fine in the portal, but the Subtotal field and Total field don't update unless I leave and return to the record.  Is there a way to force this recalculation, or worst case, can I make a recalc button with a script to recalc the page?

      thanks,

      Don

      (using FM 11)

        • 1. Re: Calculations in portal not updating page
          philmodjunk

          Do these total fields use summary fields from the line items?

          If so, you may want to use an OnObject Save trigger on the editable fields that affect this total to perform this script:

          Commit Record
          Refresh Window

          The other option is to change your subtotal and total calculations to use the Sum function to compute the total from your line items in place of the summary fields from LineItems. This does note require the scripted window refresh and you won't get a "window flash" like you do with the above script. This is not an option to use, however, if the portal is filtered using FileMaker 11's portal filter feature.

          • 2. Re: Calculations in portal not updating page
            donok

            Beautiful - thanks 

            The Sum function saved me on this.

            -- Don