Your request is confusing to me.
Drop downs usually auto enter by either checking the "Auto-complete using existing values" for an Edit box as you type, or via a dropdown with a value list attached.
So when you run a script that enters a value in the same field, why do you need an auto complete? After the value is entered, do you want to perform a find?
I also a little confused by this. If you use a script to set a field, why not just have the script, trigger what you want to happen after the set field.
ok,, let me be clearer - I tried to be as concise as possible...
The dropdown field is linked to a list of values from a table field.
It is also set to auto-complete so that, when a user enters the first character of a value, the list populates with values from the table field starting with that character. As further characters are typed, the list is filtered further until the needed value is selected.
So far, so good.
The application requires multiple values to be selected from the same list but it is usually the case that the next value to be selected comes from a subset of values that start with the same three characters - from the same group of values.
So, after a selection, further additional fields are required and then a script is triggered that processes the selected values and then returns to the dropdown field for the next value.
The script then sets the value of this field to be the first three characters of the last selection - on the assumption that the next value will be from he same subset of records (I also set the contents of the field to be selected on entry - so that if the next value is not from the last subset, typing will replace the three characters selected and begin a new entry).
However, setting the value of the field via the script does not trigger the list to be reduced to values starting with the three selected characters - as would occur if they were typed into the field.
What needs to happen - or be the next script step - to make this occur?
Hope that is enlightening...
Thanks for the interest in finding a solution sm and rg...
Is the script pausing and awaiting user interaction? Why don't you post your script? Or better still, the file?
INstead of using a set field step use an Insert calculated result script step.
The Insert Calculated Results will put the cursor in the field which will bring up the drop down list. The Set Field does not put the cursor in the field.
Set Field does not put the cursor in the field.
That is true, but it doesn't take it out either. If the cursor is already in the field which is set, it will remain there. I find it is best to explicitly take the cursor out of a field after a Set Field step—or, for that matter, explicitly put it back in there if that is what you want.
In this case, the cursor is not in the field. If you want to use the set field step it needs to be followed by a go to field step to see the drop down. If you want to accomplish this with only one step, the Insert Calculated Results step will work.
My apologies for abandoning this thread - an unexpected emergency took me away and I am not yet back - but I did briefly try the suggested solution....
Using Insert Calculated Result looked promising - and produced a drop-down list limited to the first three characters of the last selected value. BUT, selecting from the list appends the value to the three characters already there - instead of replacing them. The field is set to select contents on enter.
After the insert step run one more step, Go to Field [Select/perform; your field]. This will highlight the inserted text.
I did have a GoToObject as a last step - which I assumed would select the field as it was seen to select entire contents on enter. Apparently it didn't.
I have changed this to GoToField with Select.
But, the subset from the list that matches the 3 characters is no longer selected..!
One step forward - and one step back.
But thanks for continuing the search for a solution- Seems such a simple thing to ask of Filemaker....!!!
I tested this on my computer and it worked properly.
Sent from my iPhone
I have tested this further.
Using Insert Calculated Result with the Select box checked works fine. The 3 characters are inserted; the drop-down list appears and is restricted to a subset of matching results.
The problem is with selecting a value from this subset. Clicking on one with the mouse appends that value to the 3 characters already there - even though they are selected.
However, typing the next character of the value - or scrolling down the list and pressing Enter - works correctly and completes the value rather than appending it.
(Adding the GoTo field with Select after the Insert Calculated Result displays the complete list (rather than the selected subset) in every case).
Unless I stumble across a solution - or one is proposed - that works using keyboard or mouse in the next few days, you will get a 'correct answer' for your persistence and a solution that works with an 'as long as...'
Jeff, I now see what you are seeing. It looks like a keystroke is needed to trigger the list filtering and auto complete.
Sent from my iPhone