7 Replies Latest reply on Oct 19, 2010 1:28 PM by philmodjunk

    Portal Calculation

    dg3321

      Title

      Portal Calculation

      Post

      I have a portal which is a list of expenses for a record.  I have created a field which calculates the total expenses.  I also have a field which totals other misc credits for the record.  I then have a field which takes the total portal expenses less the total credits.

      The issue i'm having is that the field which calculates expenses less credits only automatically updates when i enter in a new credit.  It does not update as i enter new expenses into the portal.  Why is that?

        • 1. Re: Portal Calculation
          philmodjunk

          Are you computing totals with a summary field or a sum() function?

          • 2. Re: Portal Calculation
            dg3321

            sum ()

            • 3. Re: Portal Calculation
              philmodjunk

              One work around might be to add a calculation field to the portal table that computes Expenses - Credits and take the sum of that calculation field instead of summing the two fields separately and then taking the difference.

              • 4. Re: Portal Calculation
                dg3321

                I still can't seem to get it to work.  In my portal table, i took the sum of the expense amount less the total credit field from the related table and at first it seemed to work when i tested it by entering a new expense amount, but then it just started giving me negative numbers which was incorrect.

                I guess i could include the credits within the expenses portal to make things easier.  I just liked having a separate list of the credits, instead of listing them with the expenses.

                Would it be easier if i was using a summary field?

                • 5. Re: Portal Calculation
                  philmodjunk

                  I assumed you had both credits and expenses in the portal table. That would make for a typical bookkeeping ledger type layout where one column records expenses and another records credits--with a third column showing a running balance. I don't really see any advantage to keeping them separate, but then I only have the vaguest idea as to how you've set this up and why.

                  In my experience, I've found that referring to a summary field in the portal is more likely to be slow to refresh than sum().

                  If all else fails, you may need to use a script trigger that refreshes your window anytime an expense is entered or changed.

                  • 6. Re: Portal Calculation
                    dg3321

                    Ok, i'll try that, thanks.  On a side note, is there a way to program a portal (or fields for that matter) to remember prior entries when typing?  For example is 'apple' is typed in multiple times, is there anyway to program fmp to automatically have 'apple' appear after typing just the 'a'?

                    • 7. Re: Portal Calculation
                      philmodjunk

                      In inspector, there's an option on the Data tab called "Auto-complete using existing values".