Jump to content

Summary on IF Statment Calc


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

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Screen Shot 2016-04-06 at 23.31.27.png

Screen Shot 2016-04-06 at 23.31.49.png

I should add that QuotesProducts is a Portal inside a Tab on the Quote Layout.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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