A new way to count unique values in FileMaker 12
Say you have these values in a table:
and you don't want a count of all the records (7). You want a count of how many unique values exist (3). In previous versions of Filemaker, we've had to use the How to count the number of unique occurences in field. to produce this count. Or you might define a value list with the specify values from field option and use ValueCount ( ValueLIstItems ....) ) to count the unique values.
FileMaker 12 provides a new and much simpler method: ExecuteSQL
Here's the expression you can use for this:
ExecuteSQL ("SELECT COUNT ( DISTINCT YourFieldNameGoesHere ) FROM YourTableOccurrenceNameHere" ; "" ; "" )