Let me Count the ways to use this function

 

The Count function is a scripting staple for FileMaker developers, and it is used in a variety of ways, usually as a way to count related records as some sort of a test.  But as Stuart Gripman points out, it is really handy in the same table, as well:

Count simply tells you how many valid, non-blank values are present in the field or fields you specify. You may string together as many fields as you wish inside the parentheses.

three fields, one of which has no data in it

Given the fields above, Count ( Name ; Phone ; Email ) would return the number 2. If your mind isn’t instantly racing with a profusion of opportunities to use the Count function, you’re not alone. But I’ll give you two examples where Count is very useful to me.

One of my favorite uses is to count related line items for an invoice or order, set up a variable to hold that value, and loop through the related records to make any necessary changes to them.  It’s also handy to use in an If statement to test for the existence of a value in a given field or fields.

FileMaker Function of the Week: Count.

Liked Liked
Need FileMaker Development Help? Or to purchase FileMaker Software?
Contact FM Pro Gurus for help