Have you ever wanted to sort the values of a value list by a third field, or been annoyed that value lists don’t handle non-indexed data? Maybe you sometimes wished it was possible to group data or to have the value list filter when you type characters, instead of jumping? I have!
I have been thinking about a solution to replace the native value lists with a custom and more flexible way. With FileMaker 16′s new Card Window it is now possible! This is a fairly bold idea, I know, but i think I’ve come pretty far.
I presented my technique for the first time at .fmp[x]Berlin 2017 and as I had hoped, the participants and I had an interesting discussion and came up with new features and ideas. Thank you guys for your collaboration!
How does it work?
When you enter the field, the script fires with name of the source layout as a parameter. It switches to that layout and sets variables from the text objects. Then it calculates the width and position of the field and opens a card window below the field. In the card window, it processes the data in the source layout and saves it in a variable. The last thing it does is changing to the value list layout and sort it. While the card window is open, it listens for keyboard input and filters the list by the characters that the user types.
There is instructions in the database how to use it.
You can implement the Flexible Value List in your own solutions with help of the sample file (see below).
- Sort values by a third field
- Group values by a third field
- Handles unindexed data
- Just as quick as native value list to implement
- Easy to implement in a completely new database
- Easy to filter list using FileMaker search logic
- Works like a native value list with keyboard input
- Change design quickly in one place
- Easy to change settings with variables in layout
- Use native value list as data
- Show images in the list
The features I want to implement in the future:
- Show limited value list based on ID
- Show checkbox instead of highlighting the value with colour
- Five recent values on top. Last chosen values saved in a table (thank you Peter Kraaijeveld)
- Five recent values on top per session/user
- Specify list height in rows
- Animated display in Go
- Handle different languages
- Hide ID field and only show list value (thank you Paul Jansen, APJ Ltd for the idea)
- Option to enable more info with tooltip when hovering a value in the list
- Option to cache the list to handle many values
- Make it possible to add new data to the list while opened
- More..? Any ideas? Make your own changes!
- This solution will not work in WebDirect because it does not support cards. I hope that FileMaker will change that in the future.
- It’s not possible to dismiss the list by clicking outside of window
My idea is to update this post with new versions so it could be the source of the latest code. I would be very happy if you could send me an e-mail if you add features to it!
A video how it might look like when changing from a native value list to a flexible:
Download database here: Flexible Value Lists.fmp12