Hi there. I have Use Lookup Table checked and the Lookup itself setup:Field name StaffID
Lookup table is viewTeachers
Link field is ID
Display fields are Last_name and First_NameThe lookup works as expected when the Edit Tag is a Select/Drop Down menu. When changing the Edit Tag to Text for this field I can type in the field, but no Lookup takes placeThanks for listening
UpdateThe Text field Lookup works when I only have Last_Name selected as the Display Field #1. Does not work ifDisplay Field #1 Last_Name
Display Field #2 First_Name
Try enabling Tools → Advanced Settings → Auto-Suggest all display fields.
Thanks for your reply - unfortunately that didn’t do the trick.
Enable debug mode (Tools → Advanced Settings → Debug) and press F12 → Network to check the network response for the lookup. See if it gives you any hint.
So I see lots of successful 200 codes that the form is doing the Lookup, but no returned data in the JSON:https://www.#######.net/########/api/lookup?q=ste&n=10&rnd=121010&start=-1Request:name “x_StaffID”
page “DisciplineAdd”
field “StaffID”
language “en-US”
ajax "autosuggest"Response is empty{}I have another one working fine on that page named Violations, but it displays only one field (Not Lastname, Firstname like above)Request after type "Re"name “x_Violation”
page “DisciplineAdd”
field “Violation”
language “en-US”
ajax "autosuggest"Response:result “OK”
records [ {…}, {…}, {…} ]
totalRecordCount 3
version “24.7.4”
sql "SELECT [ID] AS [lf], [Violation] AS [df], ‘’ AS [df2], ‘’ AS [df3], ‘’ AS [df4] FROM dbo.Discipline_Violations WHERE [Violation] LIKE ‘Re%’ /BeginOrderBy/ORDER BY [Violation]/EndOrderBy/"Thanks for the suggestion.
sql “SELECT [ID] AS [lf], [Violation] AS [df], ‘’ AS [df2], ‘’ AS [df3], ‘’ AS [df4] FROM dbo.Discipline_Violations WHERE [Violation] LIKE ‘Re%’ /BeginOrderBy/ORDER BY [Violation]/EndOrderBy/”
The SQL shows that you have not enabled Auto-Suggest all display fields yet. Please enable and regenerate all files and try again. Also make sure that you are using the latest version (ASP.NET Maker 2024.7).
Thanks for your message. The SQL in the response you copied is from a working Select named Violation, and yes 24.7.4There is no SQL in the Discipline SQL as the response is just {}
Have you set up the option correctly as per previous reply?
The SQL shows that you have not enabled Auto-Suggest all display fields yet. Please enable and regenerate all files and try again.
If you are a registered user, you may consider sending your project file to the support email for quicker resolution.
Sorry, I missed that suggestion . I just now enabled Advanced > Auto-Suggest All Fields but still no go on the StaffID input type TEXT Lookup for both LAST_NAME and FIRST_NAME after regenerating all files. I’ve also tried different browsers, incognito tab, etc.I did notice that when the ADD page loads there is a “lookup” request made even though I haven’t typed anything yet. From F12 Developer Tools:URLhttps://www.#####.net/discipline2024/api/lookupPOST[{“page”:“DisciplineAdd”,“field”:“StaffID”,“ajax”:“updateoption”,“language”:“en-US”,“name”:“x_StaffID”,“v0”:114980},{“page”:“DisciplineAdd”,“field”:“Code”,“ajax”:“updateoption”,“language”:“en-US”,“name”:“x_Code”,“v0”:“1”},{“page”:“DisciplineAdd”,“field”:“Violation”,“ajax”:“updateoption”,“language”:“en-US”,“name”:“x_Violation”,“v0”:163625}]Request HeadersPOST /discipline2024/api/lookup HTTP/1.1
Host: www.#####.net
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0
Accept: application/json, text/javascript, /; q=0.01
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Content-Type: application/json
X-Authorization: REMOVED
Csrf-Name: __RequestVerificationToken
Request-Verification-Token: REMOVED
X-Requested-With: XMLHttpRequest
Content-Length: 341
Origin: https://www.#####.net
Connection: keep-alive
Referer: https://www.######.net/discipline2024/DisciplineAdd?showmaster=viewStudents&fk_DCID=12894
Cookie: REMOVED
ASPSESSIONIDAGSTDDRQ=DJHDJHDDPMHELNALNPMHCAOF; ASPSESSIONIDCUTTSSDA=OFHLNBHCACGAEHJDLEJEMOCH
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-originResponse Headers:HTTP/1.1 200 OK
Cache-Control: private,max-age=0,no-store,no-cache,must-revalidate
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Expires: Sat, 31 Aug 2024 04:21:07 GMT
Last-Modified: Sat, 31 Aug 2024 04:21:07 GMT
ETag: “87F26B7243B6E509EDC8F97FFE072BD9”
Vary: Accept, Accept-Language, Accept-Encoding
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Sat, 31 Aug 2024 04:21:06 GMTResponse:[{“result”:“OK”,“records”:,“totalRecordCount”:0,“version”:“24.7.4”},{“result”:“OK”,“records”:[{“lf”:1,“df”:“-”,“df2”:“”,“df3”:“”,“df4”:“”}],“totalRecordCount”:1,“version”:“24.7.4”},{“result”:“OK”,“records”:,“totalRecordCount”:0,“version”:“24.7.4”}]Thanks again.
As explained, you also need:
Enable debug mode (Tools → Advanced Settings → Debug) and press F12 → Network to check the network response for the lookup. See if it gives you any hint.
Check the network response for auto suggest (lookup), i.e., when you start typing in your text.
Thanks, I did that - response is above. Maybe I’m not understanding your message.
There will be multiple lookup responses. Press F12 → Network first. Load your page, click the Clear network log button, type the text to start the auto suggest, you should find the correct lookup response.