Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8810 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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).]

Posted

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

Posted

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]

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

Posted

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

Posted

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...
Posted

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

This topic is 8810 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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