Is it possible in FM 12, to have a dropdown value list that I can add entries to on the fly?
Would something like this suit your needs??
"The nine most terrifying words in the English language are: 'I'm from the government and I'm here to help.'" Ronald Reagan
Right idea, when I select Add an Item, I want to add an item to the value list itself.
Add a new record and look at the list again. The new item is added to the value list for your next selection. Remember that by default filemaker sorts value list in alphabetic order, so the two spaces before the "Add an Item" keeps it sorted on top of the pile.
If you are working with a static value list try option 2 in the revised file attached. Click on the edit.. option and you can add items to the static list on the fly.
Sorry, I found option 1 to be the bigger challenge and assumed option 2 had already been tried.
Option 1 is the Static list and works great. It is the Table based value list, option 2, I was trying to implement. I can't seem to enter a new value. A new record is created after I press the New Record button, but when I enter new text the field just does a lookup on the original list.
Sorry, I tested before adding the two spaces to the "Add an Item", after that the script broke. Try again with this revised file.
I try to test, test, and test. But humanity is present, "to err is human..."
Works great, thanks Tim. I haven't gone through the script yet, if I wanted to use an 'Edit...' instead of 'Add an Item' for the Table value list what would that take. The New Record button doesn't have anything to do with the value lists, right?
There is a compare test in the script that uses the literal “ Add an Item”, simply replace that and it should work. The New record button has nothing to do with the value list, it just makes it easy to test. Notice that the “ Add an Item” entry is in the value list items field just as the others and don’t let the sorting thing catch you, a couple of spaces will do. In the script a trim function incorporated into the test with the lower function will strengthen the code some.
How would I put the Edit.. at bottom on the Table based option. Don't want to bog you down on detail,because the Add an Item is probably fine.
The Fix is in.
See how this fits for size.
Works great thanks Tim.
Retrieving data ...