Jump to content
Server Maintenance This Week. ×

Problem w/ portals sep. model


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

Recommended Posts

I have been having problems with the separation model in FM7. I have attached two sample files to help you understand what I am seeing.

Files:

Source.fp7 - holds all data, contents two tables Invoice and Line Items.

Interface.fp7 - no tables, just a relation to the source file and TOs of Invoice and Line Item tables.

Setup:

I put a portal of the line items for an invoice in a layout in both files. Also I put the total field in each layout to show the sum of all the line item prices.

Problem:

The totals calculation field in Invoice table does not update correctly when displayed on the interface file, but does work correctly while displayed in the source file. If I add a line item using the interface file the total field does not update at all. It acts as if no new line item record was created. But if I do the same in the source file, all is fine.

Am I doing something wrong in the interface file regarding calculations or portals, or is this a bug in FM7? If this is a bug then it is a big one. The separation model would be worthless to use.

Any information is much needed.

Files.zip

Link to comment
Share on other sites

I have looked at your files and did not see anthing wrong with what you did. The calculation needs some thing to happen to make it update.

I noticed that when you change a quantity or price in a portal row the total updates.

I made some modifications to your files and they seem to work better.

1.) I added a standard layout of Line Items to the Interface File.

2.) I changed the relationship to not create related records.

3.) I added a table Globals to the Source file.

4.) I wrote a script to create a related record in Line Item.

The result is attached.

Link to comment
Share on other sites

Thanks for the help, but this was not exactly what I needed or was talking about. If the relationship is set to allow record creation, then the total calculation does not update all the time. In Filemaker 5 and 6 this was not a problem and is not in FM 7, except when you separate the interface from the data source file. Calculations that involve aggregate functions on portal data do not update and show in the layout.

I noticed that when you change a quantity or price in a portal row the total updates.

This right only if the record has already been typed in and recorded by the database. If you create a new record through the portal relation then all cal fields in the invoice table will not register the new record. Therefore your totals are incorrect.

I do not understand why Filemaker promotes this data and interface separation if it has such a blaring bug.

Thanks

Link to comment
Share on other sites

Sorry that is the best I can do. I can't change the program only help you work arround the problem.

By the way many developers do not use the "Allow creation of related records" option prefering to use a script and button.

Link to comment
Share on other sites

Sorry that is the best I can do. I can't change the program only help you work arround the problem.

I am sorry if I seem to accuse you that this is all your fault. On the contrary, I was only trying to point out what I was looking for so you would completely understand what I meant.

By the way many developers do not use the "Allow creation of related records" option prefering to use a script and button.

Why is this a norm, having "Allow creation of related records" set off? I find it easier for the user to do quick data entry into a list without the use of a mouse (click on button). All the user would have to do is TAB. This makes it easy for the user to memorize, and no other special keys are need, from memory, to create a new portal line.

This is the reason I use the "Allow creation of related records" for portals.

This whole thread was brought about by the fact that Filemaker has left out a major feature for their portals, which has existed from their past versions, before FM 7.

Thanks for the input.

Link to comment
Share on other sites

I have been using 3 files in the seperation model. 1)Data, 2)Business Rules & Reports which contain the calculations, and 3)Interface. I don't think that FMP7v3 has improved the refresh problem.

I don't understand what you mean by "Don

Link to comment
Share on other sites

For this to work properly You have to use Aggregate instead of Sum.

I am not sure what you mean here with aggregate and sum but in my earlier post when I was talking about the "aggregate functions" I meant all the functions listed under the heading of aggregate when choosing a function in the calculation's window. I noticed none of these functions worked, not just the "Sum" function.

I don't think that FMP7v3 has improved the refresh problem

Yes you are right. It is not fixed. I hoped this would have been. This one bug has put a big dent in FM 7 for me. This is a major flaw. I cannot use my solution in the real world, until this is fixed.

Link to comment
Share on other sites

Raymanj,

I had the same problem a while back and posted it on this fourm... here's the link to what I ended up doing, which was use the free plugin XMplStartscript to start a refresh script after exiting the amount field in the portal. This causes the total field (sum of the amount field in the portal) to update/refresh via script.

http://www.fmforums.com/threads/showflat...true#Post119358

Link to comment
Share on other sites

  • 1 year later...
  • 2 years later...

This topic is 5559 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.