Is there a way to do an autocomplete in a text box? I have 20,000 records that I want to find the record so I can't use a lookup.
Something that shows a list as I type characters so I can find the value I am looking for.
Thanks
Alan
Autocomplete
Re: Autocomplete
Lookup fields support searching for items when typing a few characters, by default.autocomplete in a text box
If you need autocomplete in a text-box can you please explain your idea a bit more detailed. Do you mean <input> or <textarea>?
You will need some Javascript on client-side which, after change, triggers an AJAX request, then some PHP on serverside which executes the search on the DV and return a result set as JSON, for example, then some Javascript again to change the text box and the cursor-selection.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Autocomplete
Hi Alan,
did you try to use a lookup? 20k records sounds much, but as users are able to type the beginning (actually any part) of the string 20k will quickly filter down to just a few.
Olaf
did you try to use a lookup? 20k records sounds much, but as users are able to type the beginning (actually any part) of the string 20k will quickly filter down to just a few.
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: Autocomplete
I was not aware of the lookup feature being able to type a few characters.
Thanks
Alan
Thanks
Alan
Re: Autocomplete
I must be doing something wrong. I have a lookup but when I run the app and go to that field I don't appear to have any way to type in the combobox. It drops down values. For testing I only have a couple items in my combobox which is derived from a SQL query against the database. Is it possible that AG is smart enough to only allow entry if the dropdown contains a certain number of records?
Re: Autocomplete
Hi,
please see the image - this is how lookups should work (1000 demo records to choose from). Maybe you could post a screenshot/screencast to show us what happens, when you try to enter something in the field by hand. This might help solving your problem.
Once you (re)gerenate your app, make sure to clear your browser cache ... just to be safe from this direction.
Olaf
please see the image - this is how lookups should work (1000 demo records to choose from). Maybe you could post a screenshot/screencast to show us what happens, when you try to enter something in the field by hand. This might help solving your problem.
Once you (re)gerenate your app, make sure to clear your browser cache ... just to be safe from this direction.
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: Autocomplete
I don't get the box that you are entering your search in. I was using Brave as my browser, but I also tried FireFox and Google Chrome and even MS Edge.
I have a video but don't seem to be able to attach. I will try sending via private message or email if I can find yours.
I have a video but don't seem to be able to attach. I will try sending via private message or email if I can find yours.
Re: Autocomplete
I see the attachment now.
I will attach in a minute.
Alan
I will attach in a minute.
Alan
Re: Autocomplete
Hi,
this is a very strange behavior. I see the first row in the dropdown is empty - this means, you could select "no doctor". Please try to make the DoctorID REQUIRED (regenerat app, try again).
I did have issues when a dropdown was not a required field (AG sends {empty value} - but currently does not correct this to "NULL" in the database. I reported it here viewtopic.php?f=11&t=4085 and think it still exists in 5.96, currently latest version)
In cases I need such a field, I add "-" as new value to the lookup source and make sure, it's the first value shown. Choosing "no doctor" could also be "-no doctor-" and also be the first entry. Maybe this solves the problem.
Please try to make it a required, regenerate and test if it's possible to search then.
Please also try another browser.
Well: What AppGini version are you using?
PS: You could make the video available to others by simply posting the link here.
PSPS: I often use the free Screen2Gif ( https://www.screentogif.com ) for demo (as above).
Olaf
this is a very strange behavior. I see the first row in the dropdown is empty - this means, you could select "no doctor". Please try to make the DoctorID REQUIRED (regenerat app, try again).
I did have issues when a dropdown was not a required field (AG sends {empty value} - but currently does not correct this to "NULL" in the database. I reported it here viewtopic.php?f=11&t=4085 and think it still exists in 5.96, currently latest version)
In cases I need such a field, I add "-" as new value to the lookup source and make sure, it's the first value shown. Choosing "no doctor" could also be "-no doctor-" and also be the first entry. Maybe this solves the problem.
Please try to make it a required, regenerate and test if it's possible to search then.
Please also try another browser.
Well: What AppGini version are you using?
PS: You could make the video available to others by simply posting the link here.
PSPS: I often use the free Screen2Gif ( https://www.screentogif.com ) for demo (as above).
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: Autocomplete
I will try your suggestion.
I am using V5.96 and tried Brave, Firefox and Chrome.
I am using V5.96 and tried Brave, Firefox and Chrome.
- aarlauskas
- Veteran Member
- Posts: 127
- Joined: 2019-04-28 18:03
- Location: Medway, UK
Re: Autocomplete
Try entering lets say 15 items in your lookup. There is a minimum number of items needed before it starts filtering, which you can set. I think you need minimum 5 before you can search for item in lookup
Re: Autocomplete
Thanks, that was it. I entered 4 and it works. Makes perfectly good sense since it really wouldn't be needed if the dropdown is a small number of items.aarlauskas wrote: ↑2021-05-29 18:56Try entering lets say 15 items in your lookup. There is a minimum number of items needed before it starts filtering, which you can set. I think you need minimum 5 before you can search for item in lookup
Solved..
Alan
- aarlauskas
- Veteran Member
- Posts: 127
- Joined: 2019-04-28 18:03
- Location: Medway, UK
Re: Autocomplete
Awesome, glad all solved