![]() ![]() Sometimes you need to pick from more than just two choices. This version of the calculation would return "$299.00" if the First Name field contained "dominique," since the case on the letter D doesn't match. It's perfectly legal to use the Exact function (or any other function, field, or expression) as the first parameter of the If function, like this: If this function is too forgiving for your needs, you can use the Exact function instead.Įxact takes two text parameters, compares them, and returns true if they match exactlyincluding case. In other words, this expression has a True result: ![]() If every letter, number, space, punctuation and so on matches, you get a True result. When you use the = operator with text values, FileMaker compares the two values on each side letter-by-letter. What do you mean by "First Name field matches 'Dominique'?" What constitutes a match? If ( First Name = "Dominique" "Free" "$299.00" )įor example, this calculation returns Free if the First Name field matches "Dominique." If it doesn't match, then it returns $299.00 instead. If the condition is false, though, it returns the False Result instead. If the condition has a true value, the function returns its second parameter (true result). When you use the If function, FileMaker evaluates the condition looking for a Boolean result (true or false). ![]() If ( Condition True Result False Result ) It's the ticket when you have to decide between two choices, based on some criteria. The If function is the basic unit of decision making in FileMaker calculations. The first and most common conditional function is simply called If. The conditional functionsIf, Case, and Choosediffer in how many possible results they support and what kind of condition they expect. The function requires one or more parameterscalled conditions or conditional expressionsthat tell it which result to pick. Each one lets you specify more than one possible result. The answer lies in the three conditional functions. Can you modify the Total Due calculation to turn red when an invoice is past due? It calculates the total amount due on an invoice by subtracting the sum of all payments from the total amount of the invoice. This chapter began by posing an interesting challenge: You have a calculation field in the Invoices table called Total Due. Along the way, you learn how to define and use variables, which act as placeholders while complex calculations go through their many steps. This section covers all those possibilities. You get functions for making decisions (called conditional functions), learning about field values, and even evaluating calculations inside other calculations. The logical function group is a diverse and powerful lot. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |