Dear Gregory,
Do you have some good method for implementing autocomplete task in csentry?
Thanks for response!
Autocomplete in Csentry
Autocomplete in Csentry
G.VOLNY, a CSProuser from Haiti, since 2004
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Autocomplete in Csentry
Right now there is no convenient option for doing this. Perhaps you could use the selcase function to simulate the behavior of an autocomplete field, though that would force the user to type part of the response and press Enter without seeing if the response is valid.
PROC AUTOCOMPLETE_FIELD
if selcase(RESPONSES_DICT,strip(AUTOCOMPLETE_FIELD)) then
AUTOCOMPLETE_FIELD = RESPONSES_FIELD;
else
// if the response has to be in the response listing, then uncomment the following line:
// reenter;
endif;
if selcase(RESPONSES_DICT,strip(AUTOCOMPLETE_FIELD)) then
AUTOCOMPLETE_FIELD = RESPONSES_FIELD;
else
// if the response has to be in the response listing, then uncomment the following line:
// reenter;
endif;
Re: Autocomplete in Csentry
Dear Gregory,
Thanks for your help. However, when i try to implement the codes, the autocomplete task is not ok...
Please can you help me more?
Thanks in advance
Thanks for your help. However, when i try to implement the codes, the autocomplete task is not ok...
Please can you help me more?
Thanks in advance
- Attachments
-
- Autocomplete.zip
- (5.25 KiB) Downloaded 387 times
G.VOLNY, a CSProuser from Haiti, since 2004
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Autocomplete in Csentry
You may want to write code more like this:
See attached for your program.
if selcase(REPONSE_DICT,"") include(REPONSE) where pos(tolower(strip(FRUITS)),tolower(REPONSE)) then
Your external dictionary file could also just consist of the fruit names instead of also having a numeric ID (that you aren't using). In that case, the ID of your external dictionary would be the fruit name.See attached for your program.
- Attachments
-
- Autocomplete.zip
- (3.5 KiB) Downloaded 458 times
Re: Autocomplete in Csentry
Dear Gregory,
Thanks for all. That's work finely!
Thanks for all. That's work finely!
G.VOLNY, a CSProuser from Haiti, since 2004