See A Fields Index In A Calculation

From Dwayne Wright PMP - Certified FileMaker Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

Have you ever looked at the index of a field? You know, click into a field and then hold down ( command key - I key Macs ) ( control key - I key Windows ) to see all the unique entries of that field.


If so, do you think it would be cool to get that listing of the values in a text field? For example, you could have a text field with all the unique email address accounts for your customers.

It can be done by using a design function along with a little bit of setup work. What you can do is create a value list that uses each value of a particular field. Then create a calculation with the ValueListItems function. This function will return the items in a value list. So, you can have a value list equal to all the unique information in a field and a function that equals the value list.

ValueListItems(Get(FileName); "Names")

Which gives us a result such as...

Bill Rife
Dan Wright
Dwayne Wright
Jane Doe
John Doe

I cooked up an example file to help illustrate this technique. It can be downloaded by clicking (here).

There is also a posting which describes the basics about FileMaker indexing. There is more to be said about the topic and anyone attending a FileMaker Developers Conference in the last few years can attest to how new discoveries about the "under the hood" behavior of indexing can be leveraged. However, I think this piece is a nice starting off point and here is the link. The Indexing Of A Field Explored