4 Replies Latest reply on Jun 25, 2013 8:23 AM by philmodjunk

    FMPA portal row edit does not update calculation and summary field in related table

    brisance

      Title

      FMPA portal row edit does not update calculation and summary field in related table

      Post

           Please take a look at this Youtube video explaining the problem.

           https://www.youtube.com/watch?v=ADr93QgVmMw

           If I click outside the portal row, the summary and calculation fields in the related table update just fine.

           If I hit the Tab key to go to the next field in the same portal row, the summary and calculation fields do not update. Attaching a Refresh Window script does not work either.

           Would appreciate any workaround or insight into this. Thank you.

        • 1. Re: FMPA portal row edit does not update calculation and summary field in related table
          schamblee

               Summary field will update when the record is commited.  When you go to the next field in the same portal row the record is not being commited.  You will have to commit the record.  You will have to commit the record with a calculation field also but there is some other items that can effect the calculation. You may have to set the storage option on the calculation field to not store but recalculate as needed.

          • 2. Re: FMPA portal row edit does not update calculation and summary field in related table
            brisance

                 But that does not explain why if I go to the next portal row, the related fields are not refreshed. Only if I click outside of the portal, does it work as expected. 

                 Please check the video again. If I tab to the next field in the same portal row, the calculation field in the same portal row is updated. But the calculation and summary fields in the related table are empty. But I know the field has been committed because if I go to another record and come back to it, then everything works as expected.

            • 3. Re: FMPA portal row edit does not update calculation and summary field in related table
              schamblee

                   The record is automatcally commited when you leave the current record or click outside the current record.  You have to use a script with commit record and  refresh window with flush cached join results checked.  Use a script tigger such as OnObjectExit to perform the script, so it will update immediately.

              • 4. Re: FMPA portal row edit does not update calculation and summary field in related table
                philmodjunk

                     But commit records will lose the focus on the current portal row and Refresh Window [flush cached join results] is a step best avoided when possible--it can lead to significant delays while waiting for your layout to update.

                     Instead of a summary field from the related table, try using a calculation field defined in the parent table that uses an aggregate function such as Sum to compute the same value. It will refresh much more smoothly.

                     If you script a commit records step, be prepared to first capture the current row number and active field in variables. Then add more steps after the commit records step to return the focus to the correct portal row and field.