Neil Scrivener Posted April 6, 2016 Posted April 6, 2016 Hi Guys, I have an IF Statement which makes a calculation. Basically I have 2 multipliers, in CalculationField is an IF Statement that is Result 1 = X * Multiplier1; Result 2 = X * Multiplier2. The CalculationField IF statement works perfectly. But what I want to do is get a total of this. The simply way seems to be to do a SummaryField is Total Of CalculationField. But it's not working! Is it not working because the CalculationField is an IF statement, or is there another reason? Cheers Neil
Agnes Riley Posted April 6, 2016 Posted April 6, 2016 Hi Neil, Can you post your actual calculation? It's usually better than paraphrasing it. And what are you trying to get a total on, the result of this calculation on the records in a found set? Then you'd have to get that from a related table. That could be an Interface table with one record in it. Hope this helps, Agi
Neil Scrivener Posted April 6, 2016 Author Posted April 6, 2016 Hi Agnes, Yes, so here is the calculation for IF Statement: Quote If (ProductsTable_QuoteDetails::Type = "Crewing"; SubListPrice * Quotes::CrewMultiplyer; SubListPrice * Quotes::KitMultiplyer) Then the Summary Field is in the screenshots below. I should add that QuotesProducts is a Portal inside a Tab on the Quote Layout.
Agnes Riley Posted April 6, 2016 Posted April 6, 2016 Hi Neil, So I made a demo file for you. Take a look and let me know if this is what you're trying to achieve. Hope this helps, Agi sum of calc.fmp12
Agnes Riley Posted April 7, 2016 Posted April 7, 2016 Hi Neil, I'm so sorry but I'm not sure what you are trying to achieve here. I took a look at your file (you sent me in a private message). Here are some recommendations for you: When creating invoices I recommend following standards that are out there. And invoice record should be self-explanatory. The same goes for a quote. Your field labels and the field names should match, so you won't get lost when reviewing your solution later. Your QuoteProducts table should be called Quote_Item, just like it should be called Invoice/Invoice_Item. The underscore is not obligatory. What's IDFK? Are you referring to a foreign key? Cause it can't be an ID (primary key) and a foreign key at the same time. I recommend naming your foreign keys either FK__TableYouAreGettingTheIDFrom or ID_RelatedTable. If you are calculating information from the child table (QuoteProducts) you'll have to create another table occurrence for the Quote table and hook it up to the QuoteItem. I added that in red in your solution. You can't have an auto-enter on your field entering ALL the values you are trying to choose later on from a radio button from a value list: http://cloud.zerobluetech.com/2i1O3w053d2s What's Quotes 2 with the same ID? The calculation is working in my file. Not sure what you mean by "not working". Here is your file back. Now if you change the kit multiplier, the line items will change. I recommend rethinking your structure. There are way too many calculations already and it's a small solution. If you haven't read the FileMaker Training series, I recommend that or picking up some books. I'm gonna have to sign of for the day. Hope this helps, Agi Hi Neil, So I made a demo file for you. Take a look and let me know if this is what you're trying to achieve. Hope this helps, Agi Neil's Database.fmp12
Recommended Posts
This topic is 3221 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