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.

Problem w/ portals sep. model

Featured Replies

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

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.

  • Author

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

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.

  • Author

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.

Hi!

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

Best Regards / Fridolin

Sum is one of the Aggregate functions in the US version. Are you using a different version?

Hi!

Sorry, I ment to say: Don

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

  • Author

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.

"This is a major flaw. I cannot use my solution in the real world, until this is fixed. "

I think is the suggestion I made to you earlier is a real world solution.

FYI, I think he meant a Summary field, not an "aggregate" field.

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

  • 1 year later...
  • Author

Filemaker has fixed this bug with its new release of FM8.5.

Now the separation model can be used to its fullest.

I am happy.

"Filemaker has fixed this bug with its new release of FM8.5."

What do you mean? What did they fix? What behavior has changed?

  • 2 years later...
  • Author

This bug can now be handled with script triggers in FM 10.

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.