Ultimate Value List Control

People like to have things their own preferred way. Wasn't there some slogan for 40 years somewhere that said "Have it your way."? If people - developers in particular - can control the output, then life is good.

Within FileMaker, value lists are one of those areas where you may feel like you simply don't have the amount of control you should have. It's neither obvious nor inherently possible to control the order in which values are presented in anything other than an explicit value list. You know, the one where you type in the literal values.

The problem is, most value lists are not static. They're typically coming from the data within your solution. It's either all values from a given field or related values through a relationship.

FileMaker only provides you with one type of output, an ascending sorted value list according to the index of the field.

You can't programmatically add to it, nor can you subtract from it. You also can't control the sort order. At least not intuitively!

In this video, I show you a simple solution which provides all of the functionality missing above. You can combine both dynamic and static values and you can also control the order in which they are presented. Need more control over your value lists? This video and technique file will provide the answers!

AttachmentSize
UltimateValueListControl.zip279.84 KB
Tags:

Comments

Thank you Matt: interesting ideas, as usual. The only drawback, in my opinion, is that the BOM technique do break one little but useful interface rule: that when you click on a field based on a value list (either in pop-up menu or in drop-down list), the list will open with the item contained in the field centered and hilighted. With BOMs removed, the field content never equals one of the values of the list, that will always open on the first item. Plus, if you use pop-up menus the menu will cover the field, so that you will not see its current value.

marcodezordo

Unfortunately, if you do need to see the selected menu in context with other options when reselecting, then you'll need to account for this with an OnObjectEnter or a entry via a Button object.

Until FileMaker provides us with more control over value lists and how they display this may be the best we get for custom ordering. :)

-- Matt Petrowsky - ISO FileMaker Magazine Editor

...and now that I think about it, you still have the option of keeping two superimposed fields, one editable with the value list attached and no BOMs removed, and a calculated one on top of it, deBOMed and "find mode" only.

marcodezordo

With very little effort, I was able to convert your StaticList to a top five Recents List, but at least for the solution, I'm working on now, I ended up just ticking Auto-Complete on.

Thanks for the only answer I've seen to sort a valuelist.

As always, very elegant. Thank you.
How would you automate the selection of category (without adding additional table occurrences) for two different fields on the same layout. e.g. In one field the category will always be cars, in the other field the category will always be fruit. You therefore do not want the user to have to make a selection of category going between the two fields. Trigger - On Object Enter to set the category for each field will require a commit record which then prevent you from selecting from the list...

Pete Boyce

Hi

The trick with the char( 65279) is awesome. But I run into a strange problem with WebDirect: I use a multi-lined list in a field on a portal, and display the contents, each line preceded by a string of 'bom's. This enables me to display a different, configuerable valuelist for each record in a portal. Very nice indeed.
After the user selects an item, this item should remain visible. That's the behavior of a valuelist. But when I use radiobuttons, the entry disappears (the value IS entered into the field, though). This problem only occurs in WebDirect (Server 17), not in FMPro.

I also tried using a popupmenu instead (after all, the user has to select one option), but the entry also disappears.
I tried removing the char(65279) with an auto-calc on the field, but no...

This effectively is a dealbreaker, I'm afraid.
If someone can come up with a solution that also works nicely with WebDirect...

Hans Erik Hazelhorst