FoxInCloud
autocompletion
Gravatar is a globally recognized avatar based on your email address. autocompletion
  Vincent H.
  All
  Dec 21, 2020 @ 06:39am

Hi Thierry,

Autocomplete search does not seem to work with accented characters, even though query results may contain them.
Is there a cure ?

Gravatar is a globally recognized avatar based on your email address. re: autocompletion
  FoxInCloud Support - Thierry N.
  Vincent H.
  Dec 22, 2020 @ 06:53am

A. you want to find e or é when typing e

change your CANDIDATE index expression into:

index on cEuroANSI(your Char Expr) tag … CANDIDATE collate GENERAL

Be aware that:

  1. You will need to have cEuroANSI() in scope to USE your table ; in other words you'll need the FoxInCloud environment to be loaded.
  2. beginning with search will be slower if your table is large (say over 5k records)
  3. e and é may sort oddly in the selection list

B. you want to find e when typing e or é

modify class awCboAutoComp of aw method wAutoComp

&& replace
tcQuery = Iif(ga_Type_IsChar(m.tcQuery), Alltrim(m.tcQuery), '')

&& by
tcQuery = Iif(ga_Type_IsChar(m.tcQuery), cEuroANSI(Alltrim(m.tcQuery)), '')

If this feature is useful, we'll add a property in aw.vcx!awCboAutoComp to enable it.

Gravatar is a globally recognized avatar based on your email address. re: autocompletion
  Vincent H.
  FoxInCloud Support - Thierry N.
  Dec 22, 2020 @ 07:59am

Thanks for your response.

In fact:

  1. I want to find e when typing "e" and é when typing "é"

Actually, search with "é" does not work

Gravatar is a globally recognized avatar based on your email address. re: autocompletion
  FoxInCloud Support - Thierry N.
  Vincent H.
  Dec 22, 2020 @ 09:37am

Would you mind explaining what exactly ‘does not work’ means for you?

  • What do you expect ?
  • What do you get instead ?

We would save so much time if the problem was always stated right away with full details…

Gravatar is a globally recognized avatar based on your email address. re: autocompletion
  Vincent H.
  FoxInCloud Support - Thierry N.
  Dec 23, 2020 @ 12:54am
  1. When I write gérard, autocompletion don't start

  1. When I write dupont, autocompletion starts

Gravatar is a globally recognized avatar based on your email address. re: autocompletion
  FoxInCloud Support - Thierry N.
  Vincent H.
  Dec 23, 2020 @ 01:25am

Thanks,

Now it's cristal clear, and I can reproduce on the FoxInCloud Live Tutorial: typing 'mère' does not trigger auto-complete on 'Mère Paillarde'.

I'll check and feedback

Gravatar is a globally recognized avatar based on your email address. re: autocompletion
  FoxInCloud Support - Thierry N.
  Vincent H.
  Dec 24, 2020 @ 06:31am

Hi Vincent

modify class awCboAutoComp of aw.vcx method wcHTMLgen

&& replace
cScript = Textmerge([function(query, process){return jQuery.get('AJAXautoComp.<<m.toHTMLgen.oConfigApp.cApp>>?value=' + query + '&ObjAddr=<<URLEncode(this.wcID)>>', process)}])

&& by
	cScript = Textmerge([function(query, process){return jQuery.ajax({];
	+   [url: 'AJAXautoComp.<<m.toHTMLgen.oConfigApp.cApp>>?value=' + query + '&ObjAddr=<<URLEncode(this.wcID)>>'];
	+ [, contentType: 'application/x-www-form-urlencoded; charset=UTF-8'];
	+ [, success: process];
	+ [});}])

Tested OK on FoxInCloud Live Tutorial

Joyeux Noël !

Gravatar is a globally recognized avatar based on your email address. re: autocompletion
  Vincent H.
  FoxInCloud Support - Thierry N.
  Dec 24, 2020 @ 10:19am

Thanks Thierry, it works for me 2 !

Merry Christmas

© 1996-2024