Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Not that much knowledge about calculations in filemaker, bit different to doing them in php scripts etc which I am more used to.

Anyway need a calculation to be made IF a drop down box is on a certain answer.

Basically my program takes data from one page and when I press a button it puts it into a invoice template and makes calculations etc.

I have a Discount box which on the first page has a drop down menu of "Yes" or "No". I want it to calculate a discount when the drop down box is selected with "Yes" and not do anything when it is selected "No" .

I am using the calculation option of each individual field on the database, this is not through a script but could use one if its easier? no sure?

All my other calculations of adding the prices up etc are done through the calculations option on the individual fields.

Cheers.

Will

Posted

Not sure if I follow you here. Why are you looking to use a script trigger for this? A simple modification to your total calc should be sufficient. Could you explain further?

Posted

Am not sure whether I should be using a script to do this or just a calculation.

I am not sure how to make it do a calculation if a certain field is set to "yes" rather than when it is set to "no".

basically I:

Press a button.

It uses a script to put all the data from one page and drop it into corresponding fields on the template invoice.

On the template invoice it picks up the prices that are entered in certain fields and does simple adding calculations etc to get the total.

What I also have though is a discount option that takes off 20% of the sub total. What I have on the previous page before it moves all the data to the invoice template is a drop down box with the answers "Yes" and "No" for options.

What I want it to do is when the drop down box is selected with the "Yes" option is to calculate the 20% discount on the next page. and when it is selected "No" it ignores the discount.

Cheers,

Will

Posted

Well, one thing I've found is that Management wants to track the discounted amounts separately. So this is a business call. But what you need is a Case() or If() calculation which bases its result on the criteria of Discount = "Yes".

Case (

Discount = "yes" ; .8 * SubTotal ; SubTotal

)

Or have a DiscountAmt field auto-enter (replace) of:

Case(Discount = "Yes" ; Subtotal * .2 )

Then your final total would be:

Case (

DiscountAmt ; SubTotal - Discount ; SubTotal)

... But you may rather want the discount to be an a number (20 for 20% etc) in case the Manager or Salesman changes negotiations. This is a business rule; salesmen are notorious for making deals and giving special disocunts and they like entering the discount amount.

So then it would be:

DiscountPercent (number field)

SumTotal (number calculation) = SubTotal - DiscountPercent

... no Case() required and no 'discount "yes" field'.

Only you can say which would work best for you. But a discount field with yes or no doesn't really tell you much. And you may still need to ask "at the end of the day, when the sales are done, what is the summary of all discounts so I can write it off?"

... just some things to consider.

Posted

Cheers will run through those different things and see which works best.

Thats what I was looking for! thanks.

Will

Posted

Well, I dropped my thought on this portion ...

[color:blue]So then it would be:

DiscountPercent (number field)

SumTotal (number calculation) = SubTotal - [color:gray]DiscountPercent

... no Case() required and no 'discount "yes" field'.

Of course that isn't right - I was starting to say that sometimes you want the discount total as separate field so it can be summed more easily for posting to the GL or for Commissions. So it would be SubTotal - DiscountAmount instead of DiscountPercent. But I think you see there are ways to go here. You may want to enter discount percent and have calculation apply it to SubTotal or enter DiscountPercent and have DiscountAmount calculated and then apply to SubTotal.

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