vtorres514
Posts: 3
|
Posted: 04/23/2008, 9:29 AM |
|
I want to turn one of the textboxt into an Autocomplete, when it finds the name, I would like to also return the id of the row. Ex. Client Name return client id. Any ideas
_________________
V Man |
|
|
phil
Posts: 4
|
Posted: 04/30/2008, 12:36 AM |
|
I had this same issue - I spoke to support about it. Returning a corresponding ID from ajax autocomplete is not a built-in function. They acknowledged it was a logical feature addition.
The work around is to do a SQL lookup in the appropriate event (Before Insert in my case). See my two examples below for two different AJAX autocomplete fields on my form.
Asset_Job_CodesF1.Text = Ctype(New integerfield("",Settings.financedataaccessobject.ExecuteScalar("SELECT client_ident FROM proposal_clients WHERE client_name Like '" & Asset_Job_CodesF1.Text & "'")).value,Int64)
Asset_Job_CodesF2.Text = (New textfield("",Settings.financedataaccessobject.ExecuteScalar("SELECT ID FROM timefileruserlist WHERE FullName Like '" & Asset_Job_CodesF2.Text & "'"))).GetFormattedValue("")
|
|
|
|