Welcome! Log In Create A New Profile

Advanced

Search string on PPC

Posted by Hans60 
Hans60
Search string on PPC
February 14, 2009 08:36PM
I am trying to implement a search function in a small pop up window for a PPC tool.
a) it has a Window with a contact database table and a
b) search function as small pop up window.

Entering a name should find the contact it however finds only the first letter and not the exact name.
any ide what is wrong with this code?


// Search User
n is int
n = TableSeek(WIN_Table_staff.Table_staff.COL_NACHNAME,EDT_SearchInput,False)
// n is different to -1, the name should be found
IF n<>-1 THEN
// select a user in the list
TableSelectPlus(WIN_Table_staff.Table_staff,n)
// bring list view up to date
ListDisplay(WIN_Table_staff.Table_staff,taCurrentSelection)
// Update information
// // Run Process(WIN_Table_staff,prcSelection)
ListSelectPlus(WIN_Table_staff.Table_staff,TablePosition(WIN_Table_staff.Table_staff))
END

Hans





Edited 1 time(s). Last edit at 02/17/2009 10:21AM by Hans60.
Jeff Graham
Re: Search string on PPC
February 16, 2009 05:50PM
Try changing False to True in your TableSeek and that should do an exact match.

Jeff
Hans60
Re: Search string on PPC
February 17, 2009 10:13AM
Hi Jeff
yes I have tried that as well. The problem is it will only find a name if the entire name is written out correctly
what I need is that it will jump with each enterd letter to the matching name. If it is set to "False" it will only find the first contact with a specific letter. If I set it to True it will find the correct contact but only if I enter entire name.
Hans
Fabrice Harari
Re: Search string on PPC
February 17, 2009 12:59PM
Hi Hans

2 ideas:

- forget the search window... After all the column header search function included in the table is doing EXACTLY what you are trying to achieve

- if you really want your search window, first check that your code is executed each time the user modifies the search field. For that, either use the debugger, or add a display each time the search function is executed (your code is, I suppose, in the 'modification' part of the field, so add a display with the time each time you run it to be sure it's executed each time (and not only once)

Also check the content of the "EDT_SearchInput" field at each modification

best regards

Hans60
Re: Search string on PPC
February 24, 2009 01:57PM
Thanks Fabrice for your input!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: