Alphabetical Search Button Bar in FileMaker 14
Douglas Alder of Homebase software puts the button bar through it’s paces and delivers a great looking, easy to build, reusable on multiple layouts with only one script, Alphabetical Search Button Bar:
FileMaker Pro 14’s new button bar brings a new twist to an old technique for creating alphabetic searches of your data. Instead of creating 26 individual buttons it is possible to create a single button bar object and then easily reformat it using text style changes or FileMaker CSS style changes. The button bar can also be repurposed to horizontal or vertical layouts. Finally I demonstrate how to use the same script from different contexts to perform different searches — a list search and a portal filter.
Since the button bar is one object, applying style changes is easy. And the script he wrote is almost modular, requiring only minor modifications to repurpose it for other layouts.
Check it out and download the example file at the link.
Source: Alphabetical Search Button Bar in FileMaker 14 | HomeBase Software
Michael Rocharde
August 14, 2015 @ 9:47 am
It’s a very nice technique but I prefer to use just a simple radio button, that displays the index letters of all the last names, in a global field with a relationship to the Index. Then when you select a letter it immediately displays all matches in the portal and you can filter down from there. (The other advantage is that it only shows letters that are actually in use so whenever you click on an option, you are guaranteed results).
Don Clark
August 14, 2015 @ 1:09 pm
I like your idea, too, Michael. A bit easier to build, downside is it won’t look as snazzy.
Brian
August 17, 2015 @ 5:38 pm
I guess I’m a noob to FMP, but I can’t figure out how the parameter works. The script opens a Find, then inserts the parameter string into the “Last” field [i.e. Last Name] OK, that’s easy conceptually. But how does the correct letter get into the placeholder/variable “Parameter”? I don’t see it.
The script line is:
Set field [ Contacts::Last ; ( Get ScriptParameter ) ]
I see the “Get” part. Where does FMP “Get” the data?
Don Clark
August 18, 2015 @ 12:58 pm
It is assigned by the developer when they assign the script to the button. When you choose the script to assign, there is a place to enter the parameter (A,B, C, etc).