I'm trying to find out a way to edit a field (that is reload a record in a form and populate every field) that is set as an autocompleter dropdown.
Is that possible? Should I give up on using the autocomplete feature?
Thank you
maxx
I thought I found a reliable solution to my question but I found out I was wrong.
I used the options and Selected values in order to load the correct option when the Selected values is read when reloading a record. The problem is that that works fine when there's a record but if there's a validation error and the record field is empty CF uses the value from the record and not the session value.
Some more detail:
I setup a form with a Dropdown control set up as an Autocomplete field (AutoComplete event).
I set the Options field with something like {var:myfield_txt} where myfield_txt is a string formatted as an array of key/value pairs. The variable has 0 or one row, 0 if I'm creating a new record, one row if I'm reloading one record in the form.
The Selected values field is set to {var:read_data99.myTable.myfield}. When I reload a record in the form the dropdown has only one row with a value that is equal to {var:read_data99.myTable.myfield}.
That works fine if myfield is not empty and there's not a validation problem. In the latter case when the form is reloaded, the dropdown Selected values is set to nothing, not to the session value of the field.
I should probably set up a test form.
The problem is that the Autocomplete dropdown is more complex than a simple dropdown and it wasn't created having in mind the possibility of reloading a form.
bye
maxx