PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Record search
Record search
Débuté par Joris, 02 fév. 2006 06:53 - 4 réponses
Posté le 02 février 2006 - 06:53
Hello,
A question, maybe easy to answer :
I have an article file, containing the article-code field. Everything works fine, i can easaly find an article by its code with the hreadseekfirst command.
But, now we have a customer who uses article codes with spaces and -signs in it. For example 'BOSCH 001321' or ABC-123-963. You still can find the article by searching on the correct code, but the problem is that the end-user has to be able of searching without the spaces in it. For example BOSCH001321 and ABC123963.
Is there anyone who has experience with this? Thanks for your reply!
Joris.

ViBizz
Posté le 02 février 2006 - 09:40
Hello Joris,
Depending on the type of key (unique or not) and the content of the item, making the text key insensitive to Case, Accent, Spaces and Punctuation might do the trick.
Regards
Mat
Posté le 02 février 2006 - 09:40
Hello,
A question, maybe easy to answer :
I have an article file, containing the article-code field. Everything works fine, i can easaly find an article by its code with the hreadseekfirst command.
But, now we have a customer who uses article codes with spaces and -signs in it. For example 'BOSCH 001321' or ABC-123-963. You still can find the article by searching on the correct code, but the problem is that the end-user has to be able of searching without the spaces in it. For example BOSCH001321 and ABC123963.
Is there anyone who has experience with this? Thanks for your reply!
Joris.

Hello Joris,
I guess you are using a Hyperfile database ?
You can add a search field in the database, which would contain the article code, without any space or sign. To simplify the initialization of this field, create a Trigger on hAdd and hModify, so that it will have the right value wherever you add or modify a record in your application.
Regards,
Michel Fages
Posté le 02 février 2006 - 11:43
Hello Joris,
Depending on the type of key (unique or not) and the content of the item, making the text key insensitive to Case, Accent, Spaces and Punctuation might do the trick.
Regards
Mat

Indeed, in your analysis set the index not to be case, space, punctuation or accent sensitive. Then it doesn't matter what you fill in in the search field.
Cheers,
P.
Posté le 02 février 2006 - 12:10
Thank you for your responses.
I will use the solution with the extra field + a modified search-window. Not the option with the field property 'non-space-sensitive' for the simple reason that my article-code is a unique key-field and that i will come into trouble for some special article codes.
Thanks again,
Joris.

ViBizz