Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with totaling protals

Featured Replies

I have two files. Invoices and Items.

In the Items file I have a the following calculations...

subtotal = price * qty

extras_subtotal = extra * qty

final subtotal = subtotal + extras_subtotal

In the Invoices file I have the following calculations...

net = Sum(items::final subtotal)

sales tax = net* .5

final total = net + sales tax +shipping

The calculations in the invoice file don't show up until I click in the field and then exit the field.

Questions:

Am I doing something wrong?

If so, what would you suggest as an altenate method?

Thanks,

Graham Sprague

[This message has been edited by spragueg (edited August 24, 2000).]

Portal updates are an unsolved problem in FileMaker. The usual way to force an update is "Enter Preview Mode" followed by "Enter Browse Mode". How you work this script into your interface without it seeming too contrived is an exercise left to the developer! -bd

quote:

Originally posted by LiveOak:

Portal updates are an unsolved problem in FileMaker. The usual way to force an update is "Enter Preview Mode" followed by "Enter Browse Mode". How you work this script into your interface without it seeming too contrived is an exercise left to the developer! -bd

Sometimes and "Exit Record" script step will do the trick, or a "Refresh Window" also.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Senior Filemaker Developer

http://www.database-resources.com

mailto:[email protected]

=-=-=-=-=-=-=-=-=-=-=-=-=

  • Author

I have been using portals for two years and have never had a problem like this. My totals always worked. I must have made a mistake in the calculations. Or maybe the calculations in the items file are to complex to do on the fly and when the file is viewd through a portal the Sum() calculation can't complete? If this is so I am very dissapointed with FMP5.

G

quote:

Originally posted by spragueg:

I have been using portals for two years and have never had a problem like this. My totals always worked. I must have made a mistake in the calculations. Or maybe the calculations in the items file are to complex to do on the fly and when the file is viewd through a portal the Sum() calculation can't complete? If this is so I am very dissapointed with FMP5.


I would doubt that is the case. However realize that these "on the fly" portals are UNIQUE to Filemaker and no other RDMS has them. The rest work on a transaction/query basis.

You have been spoiled by Filemaker "on the fly" capabilities, do not fault them for limitations of a capability that no other RDBMS possesses.

First check you calculations without the portal being involved (I have never ran into a calc that did not work across relationships) and if it still does not work correctly then there is something wrong with it.

Second is a portal refresh issue and you will need to deal with that via scripting if that is what is causing the problem.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Senior Filemaker Developer

http://www.database-resources.com

mailto:[email protected]

=-=-=-=-=-=-=-=-=-=-=-=-=

  • 1 month later...
  • Author

I finally found the problem.

I had a Sum() in the portal and then a Sum() in the parent file that required the result of the first Sum().

For some reason FileMaker does not take kindly to "Nested" Sum() statements.

For a workaround I stamp a number field with the result of the calculations each time a user exits a related record. Then I use the Sum() in the parent file number field rather than the calculation field. Now everything works fine.

G

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.