LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

active table search

I am trying to emulate the pop-up box in outlook for the global address list.  Some functionality I'm looking for is while the user begins to type in the last name, the table scrolls automatically up or down displaying the names accordingly.  I have a table with lastname, firstname, initial, email.  I can do a search on the lastname, but I want the names to be actively displayed (table scrolling up and down), then the user can just select the name he wants.  I'm trying to eliminate the user having to type in the entire last name in order to find the correct email address.

 

In simpler terms, I would like the same functionality as the pop-up window in outlook.

 

Any suggestions is appreciated.  Thanks.

 

LV 8.5.1, WinXP Pro

0 Kudos
Message 1 of 7
(3,232 Views)

HI

 

Search the element in the table and find out the row index which you want to point out.

 

Using porperty "Index Values" of table you can assign the top left corner, in this you can mention your row number that automatically scrolls the table as shows your record on the top.

 

Hope this helps

 

Regards

Santosh

Message 2 of 7
(3,210 Views)
Santosh is on the right track. Additionally, you are going to want to right click your string control and select 'update value while typing'
Stephen B
Message 3 of 7
(3,192 Views)
Guys, thanks to this point.  I understand how to scroll the table.  Now, how do I perform the search.  I have code that will perform the search if the entire name is entered.  How would you do a piecemeal search?  For example if the last name is Smith, I would like to be able to type s, have the table scroll to the beginning of s, then type m, have the table scroll to sm and so on.
0 Kudos
Message 4 of 7
(3,182 Views)

HI

I dont know the exact methond but you can use the following technique

First make sure you have sorted the data, then take an coloum you are searching

When Search element value changes (when you type anything for search), read the size of string

Reshape all the elements of your coloum array to that size and

simply find out the index by searching in that coloum array

 

Does this make sense?

 

Regards

Santosh

 

Message 5 of 7
(3,167 Views)

Hi BB Herman,

You could use an event structure that triggers on the value change event.  Put your search code in the event structure.  If you set the control on the front panel to update value while typing it will do your search every time you type a letter.

 

Best Regards, 

Bryan H.
0 Kudos
Message 6 of 7
(3,148 Views)

Thanks for everybody's help.  With everyone's suggestions, I was able to put some code together and have a working prototype.  Attached is an image of the block diagram.

 

Thanks again.

0 Kudos
Message 7 of 7
(3,110 Views)