This content has been marked as final. Show 2 replies
With that being said, I would consider using built-in APEX functionality to simplify, such as Text Field with Autocomplete. Instead of the normal text field you're using now, you could switch it to type Text Field with Autocomplete and specify an LOV query, such as:
order by 1
As the user types, they can see a list of names that already match what they're typing. In my opinion, this would be a much more elegant way to solve the problem.
Not to mention much less work, which we're all fans of :)
Here's an example of the Text Field with Autocomplete in case you haven't used it.
user = demo
pass = demo
Hope this helps.