2 Replies Latest reply on Jan 24, 2012 9:20 AM by Stephen Huston

    Calculation fields in portal not updating


      We create Quotes and POs in a table named "Files" which uses the table "Files Detail" in a portal for the line items. Simple right, been working great for over 2 years. About 2 weeks ago the line items stopped updating dynamically when a change is made. If you change the quantity or price on a line in the portal you have to click on the "Amount" (QuantityXPrice) field to get the new extended price. Also, this does not update the Total field which calculates Sum(Amount) from the entire portal. You have to go away from the record to get the Total to show up correctly. I am not exactly sure when this started, I have a copy of the file I made almost 4 weeks ago that does not have this problem so it started since then.


      To get something simple out of the way; it is not an indexing problem, nothing is being indexed in the Details table except the unique ID field.


      At a loss,


        • 1. Re: Calculation fields in portal not updating

          You said that Nothing is being indexed in the details field except for the ID field, but what about being stored? Does the 'Amount' field store the calculation results or is the 'Do not store calculation results -- recalculate when needed' box checked under the calculaiton's Storage Options? If that has been unchecked I could see it causing the problem you're having.


          Also, have you had any file crashes recently? It's odd that something that has worked for two years would just stop working out of nowhere. If you have had a crash I would roll all of your data into a clone of the old file and abandon the current file. We have a no-crash policy here specifically because crashed files can cause abnormalities that may not seem big at first but could snowball eventually.



          • 2. Re: Calculation fields in portal not updating
            Stephen Huston

            Hi Paul,


            I have seen portals fail to update unstored calcs many times, and have had to program around them since at least version 8. There are several solutions or workarounds to force the screen to refresh and thereby update what is displayed.


            The simplest and lowest-tech is a button near a corner fo the portal that's labelled "Update Portal" and runs a simple Refresh Window script step with Flush cache enabled.


            You can also go to script triggers onObjectModification or onObjectExit tied to fields in the portal.


            The problem is that FM doesn't always recognize that layout displays need to be updated for display when the info is not in the layout's Base-TO.


            The fact that you noticed this recently may have to do other file issues, or it may just be when someone noticed or things got slower on your network.


            This can  be affected by network traffic in shared/served file systems where the cache is not refreshed or not refreshed as quickly as expected.


            Stephen Huston