hamelekim Posted January 5, 2006 Posted January 5, 2006 I am having great difficulty in getting a summary of a field in a portal. I have acres in a portal, the use types in the number for each type of crop in this portal. There is a field outside the portal that sums up all the acres. When I type in the acres it won't display the sum, but when I leave the layout and come back the sum is displayed. Also when I change a number for acres and click outside the portal then the updated sum is displayed, but when I tab out of that field to the next in the portal the summary field goes blank again. I need it to update and display constantly but I Just don't see any way of doing this. I have tried a calculation field as well and that didn't work. I am running out of ideas as to how to solve this issue. Is it maybe a bug in filemaker? Hope someone can help me.
Søren Dyhr Posted January 6, 2006 Posted January 6, 2006 I have tried a calculation field as well and that didn't work. Well it should be a unstored calcfield containing the agregate function Sum(relation::number_field) to freshen accordingly. What it seems to be you've done is pull a summary field from a relation away ...we do often encounter this confusion here, but it's so that the event model filemaker uses needs a calcfield in current layout to evolve although it would seem like you're manipulating data a relation away. --sd
hamelekim Posted January 6, 2006 Author Posted January 6, 2006 Actually, no. The total acres field is in the same table as acres. I just have it outside of the portal because I don't want it showing up multiple times, it is a total afterall. I have already tried calculation fields with don't store, I have tried a summary field too. Like I said It is only an issue when you stay in the portal after typing in a value in the acres field, instead of clicking outside of the portal. I think it is a bug in filemaker and not something I am doing wrong. The value does show up so it is being calculated, it just won't display unless I enter in the data in a very specific way, clicking off the portal after each value has been typed into the acres field.
Søren Dyhr Posted January 6, 2006 Posted January 6, 2006 I think it is a bug in filemaker and not something I am doing wrong. Feel free to think so, but filemaker have then behaved buggy at least ever since 1995, when I entered the vessel! As it is, works should the Sum( be over a relation either a selfjoin or relation between two tables. Granted it could be a Summaryfield in the portal table, but it won't freshen except when you flush cache to disk or manipulate the rolodex. If say you place an extra selfjoin relation on the foreign key and makes the aggregate function over this and pulls it to the layout where the portal lives, is it just as stubborn to freshen as summaries a relation away. You need to have the calc with the aggregate function to live in the table where the layout you're working in belongs to. Which means that you have to make it over the relation for the portal. I may falsely grown into believing that it isn't a buggy virtue, but instead the way the calcualtion engine works in this tool! http://www.fmforums.com/forum/showtopic.php?tid/172085/post/186958/hl/%22Filemaker+does+not+monitor+related+records%22/#186958 I need to quote Comment here: Filemaker does not monitor related records for changes. That's just the way it is, and there's no magic word that will make Filemaker do something that it does not. In most cases, the need for indexable calculation based on related records is an indication that the solution is not following the "Filemaker paradigm" (for lack of better expression). So far, I don't recall anyone presenting a real problem that could not be solved within this "limitation". I put "limitation" in quotes, because I don't truly see it as a limitation - to me it is merely a natural result of the application's underlying philosophy. Put it ...perhaps too simple, is it the rendering of the layout you enter something in that pulls the calculations into work, nothing happens in the records not shown. Sums are unstored calcfields in order to reflect changes and are sleeping unless pulled by a rendering. --sd
hamelekim Posted January 6, 2006 Author Posted January 6, 2006 Ok... The Layout I am on is for the Table "PurchaseOrder". You enter in crop information for that purchase order in a portal which is for the Table "Crop Savings". So you have a foreign key (the purchaseorder id) in the crop savings table. There is one purchaseOrder table record and one Crop Savings record. They are linked by the id "12345" The user can enter in the number of acres in the portal for 11 different types of crop that they could grow. The TotalAcres field (which sums up Acres) is in the Table "Crop Savings", which also contains the field Acres. The sum function works, it works only when I type in a number in one of the acres fields in the portal and then click off the portal. if I just tab over, or if I click on an acers field below the TotalAcres field remains blank. I can go back into the portal and change or retype one of the numbers and then click off the portal and then the total of all the Acres is displayed in the TotalAcres field on the screen. So it does work, but only if you type the information and then click off the portal. I wouldn't call that any way to properly have a sum field work.
Søren Dyhr Posted January 7, 2006 Posted January 7, 2006 The TotalAcres field (which sums up Acres) is in the Table "Crop Savings", which also contains the field Acres. This is exacly here it's going wrong, where is the relation or the range of fields to sum defined ...a relation away from the layout your entering it in! Investigate this attachment - I might be mistaken if it isn't freshing accordingly??? --sd PurchaseCrop.zip
Recommended Posts
This topic is 6896 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 accountSign in
Already have an account? Sign in here.
Sign In Now