4 Replies Latest reply on Jun 17, 2013 3:22 PM by pbartel

# Logical Function - how to?!

I'm not very good at FileMaker, having been using it only for about a year and it isn't my primary job responsibility. I'm trying to learn from manuals and books as I go.

However, I have one thing that I need help with, that I just haven't been able to figure out on my own. Hoping someone can point me in the right direction! You've all be helpful in the past with suggestions on the manuals / books to buy, so hoping you can help further.

I need to automatically choose the LOWEST of three calculations to be the final invoiced amount. I had it set up last year using an IF() Function as we only had two calculations to choose from. I now have to add a third and I don't know how to adjust the calculation to accommodate this third option.

Help?!

• ###### 1. Re: Logical Function - how to?!

Hi. You might start with the Min() function.

Example, Min( 5; 3; 9; 7; 8 ) — yields 3

You might use it like this: Min( calcfield1; calcfield2; calcfield3 )

• ###### 2. Re: Logical Function - how to?!

I'd suggest using the Let () function. It allows you to use the results of each test in later test.

Let ( [

result1 = Case ( A < B ; A ; B ) ;

result2 = Case ( C < result1 ; C ; result1 ) ] ;

result2

• ###### 3. Re: Logical Function - how to?!

Hello, pbartel.

Assuming this is being done in the Calculation Dialog, you can use the Min function to determine the minimum value. Example:

Min ( Subtotal ; DiscountTotal ; StandardAmt )

will return the smallest value among the three options. Note that this will work if the three fields are on the same record. (This would include calculation fields.)

HTH

Mike

• ###### 4. Re: Logical Function - how to?!

Thanks all. I'll be madly reading up on these sections of the book tonight... to see if I can figure out how to accurately apply these suggestions to my d.base.

Keep 'em coming!

And thanks for the direction. I felt like I was swimming in mud here.