1 Reply Latest reply on Apr 18, 2012 11:12 AM by philmodjunk

    Refresh Window question



      Refresh Window question


      i have a layout with portals, sale and receipts. the the layout's table calculates the balance due with script triggers in several portal fields. if i changed the sales or receipt values, the balance due would sometimes update, sometimes not. when i put a refresh wimdow script step in. the calculation are reliably performed.

      i have 3 questions-

      1) why didn't the calculations get performed without the Refresh Window step

      2) what does Refresh Window do?

      3) what is the "Flush cached join results" about? 

        • 1. Re: Refresh Window question

          Why do you need to script this at all? A calculation field can compute a portal total (and other values based on that total) and will update as portal records are added/deleted/changed without any scripting.

          1) you may have needed to first commit the record before refreshing the window

          2) It "repaints" the window--this sometimes gets values in certain fields--from related tables more than one occurrence 'away' from the layout's table occurrence, summary fields from related tables, recently changed variables used in merge text... to correctly display their current values.

          3) It's an option to be avoided if at all possible. It completely "requeries" and re-evaluates all calculation fields and links to related fields and any portal filter expressions. In a list view layout with lot's of data, a slow network, an FM GO client etc., it can produce glacially slow screen updates. It can usually be avoided with some creative scripting and/or relationships that use the X operator.