NetTalk Central

Author Topic: Auto complete  (Read 6252 times)

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Auto complete
« on: June 03, 2019, 12:50:00 PM »
Hi,

Is it possible when I enter a complete new value into an autocomplete field (value will not be shown as autocomplete),
to have that value added to the lookup file and have the form act as if the value already existed in the lookup file?
If so, how would I do that?

Cheers,
René
Rene Simons
NT14.14

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Auto complete
« Reply #1 on: June 03, 2019, 04:07:51 PM »
Adding a Lookup Button and setting in the Lookup settings tab the "Allow custom value not in lookup table"?
-----------
Regards
Alberto

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Auto complete
« Reply #2 on: June 03, 2019, 09:40:52 PM »
Hi Alberto,

That could be a solution but I insist on the autocomplete feature for ease of use.
It could be that you put me on a track that might be worth  exploring  however.
Thanks!

René
Rene Simons
NT14.14

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Auto complete
« Reply #3 on: June 04, 2019, 03:44:09 AM »
You can use Autocomplete with lookup button.
-----------
Regards
Alberto

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Auto complete
« Reply #4 on: June 04, 2019, 11:33:23 AM »
Hi Alberto,

I don't want a lookup button.  :)

René

Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Auto complete
« Reply #5 on: June 05, 2019, 01:25:13 AM »
>> Is it possible when I enter a complete new value into an autocomplete field (value will not be shown as autocomplete),
to have that value added to the lookup file and have the form act as if the value already existed in the lookup file?
If so, how would I do that?

that feature is not currently in the system, so if you wanted to do that you'd have to code it.
I guess the starting point would be the Validate::whatever routine - the new value would come in there you can detect it's new and add the new row there if you like.

I suspect though this would lead to a LOT of "almost duplicate" records with bad spellings etc.

cheers
Bruce

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Auto complete
« Reply #6 on: June 05, 2019, 02:08:16 AM »
Bruce,

>> I suspect though this would lead to a LOT of "almost duplicate" records with bad spellings etc.

I am fully aware of that but I am willing to take the risc. I don't expect that many records in that particular table.


Additional question:
At this moment, when I type a new value, (without your suggestion worked out), the entry field blanks out as soon as I tab to the next field.
Will this remain this way or will the new value be kept in the entry field, because the record now exists (after your suggestion is worked out?)

Cheers,
René
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Auto complete
« Reply #7 on: June 05, 2019, 02:17:47 AM »
The "blank out" is coming from that same routine. You'll see it happen there (when the GetDescription fails.)
So your code should take care of that.

cheers
Bruce

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Auto complete
« Reply #8 on: June 05, 2019, 05:11:06 AM »
Bruce,
I'll try and get back to you.
Thanks,
René
Rene Simons
NT14.14