Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 1 Jahr
Letzter Beitrag:
vor 1 Jahr
Beteiligte Autoren:
Sammy Broeders, Allard, kingdr, Frans, Fabrice Harari

[WD20] Search in more data columns

Startbeitrag von Sammy Broeders am 31.10.2016 18:16

Hello all,

Is it possible to search directly in more columns of a data file? So whe i type "Ja" all the words contains this will be in a list and not only when the word starts with it.

Jan de Kok Garage de Kok
Piet Jansen Bouwbedrijf Jansen
de Jong De Jong Inovations

Antworten:

Hi Sammy,

yes, it's possible.

You can either use the full text index available in the analysis description, or build your own dictionary file when adding/editing, and searching on it instead of the main file, as I'm doing in WXEDM.

Best regards

von Fabrice Harari - am 31.10.2016 18:36
Hi Sammy and Fabrice,

I thought that full-text index only searches for the whole word and not for a part off it in text-fields.
So not a part off a word.

von Frans - am 17.11.2016 19:41
I saw it in MVP RAD sample but don't know how to use and apply, it's interesting and
does the job in any column accross the table. I wonder if wxlive could provide it on youtube will be great.

HTH

Cheers

King

von kingdr - am 17.11.2016 20:29
Hi,
I have a search field that I palce above the table. In the table I deactivate d the search stuff the search field searches in two colums at the same time is this what you need?

If so I can profide you with the code

regards
Allard

von Allard - am 17.11.2016 22:21
Allard,

I think that is a good solution for me.

von Sammy Broeders - am 18.11.2016 07:47
Ok.

this is a bit of code I use for serching on two clumns one is numeric and one is tekst.

The table can be filled by a file or a querie. The code is added in the : filtering the records "section.

nEerste, nTweede is int

IF EDT_zoek Null THEN
//RESULT Position( Klanten.FirmaNaam, EDT_zoek ) > 0 or Position( Klanten.Klantcode, Val( EDT_zoek ) ) > 0
IF Val( EDT_zoek ) > 0 THEN nEerste = StringStartsWith( MySource.grootboeknr, Val( EDT_zoek ) )
nTweede = Position( Lower( MySource.gBNaamOmschrijving ), Lower( EDT_zoek ) )
// Trace( Klanten.FirmaNaam,nEerste, nTweede )
RESULT nEerste + nTweede > 0


END


the thedit field dus a call to a button . In the button the table is displayd bij tabledislpay( tainit)

This way youcan type in a letter or number and filtering wil instantly begin. Verry cool and verry vast.

regards

Allard

von Allard - am 18.11.2016 14:05
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.