From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

UI Interest Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto Filter String contant based on ENUM

Hi guys,

I have been trying to implement a sort of auto filter in labview. The idea is to have a string control, when the user start writting something in the string it automatically gives options based on what the user is writting. Its the same idea like google search that it gives us suggestions but in this case I want to get the suggestions based on a enum which already  predefied .

Is it managable in LABVIEW ?

Regards
0 Kudos
Message 1 of 10
(6,802 Views)

I have something like this but I am using SQLite behind the scenes and doing the match in there, for all things it is "like". The other option is to run through your list with the search string function with both inputs capitalised and return only those elements from the array where the search index > -1.  Mike

Message 2 of 10
(4,572 Views)

Does somethign like this fit your desires?

http://screencast.com/t/kZgcJAy3KsMI

2015-12-02_1101.png

Message 3 of 10
(4,572 Views)

MikeeB wrote:

I have something like this but I am using SQLite behind the scenes and doing the match in there, for all things it is "like". The other option is to run through your list with the search string function with both inputs capitalised and return only those elements from the array where the search index > -1.  Mike

If you really want to "Google Search" large amounts of data, you can use the "Full Text Search" virtual tables in SQLite.

0 Kudos
Message 4 of 10
(4,572 Views)

The file is in LV2013 version

Enter the input string in the string control. Double click on the suggested option below the string to select it.

The suggestion string are taken from the values in the Enum. Update the Enum to add or remove more options for string suggestions.

0 Kudos
Message 5 of 10
(4,572 Views)

There is the obvious "Use a Combo Box".  No coding required.  Might not quite behave exactly how you want, but it might just be close enough.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 10
(4,572 Views)

I have attached a sample with SQLite what MikeeB said.  This VI dynamically loads the sql search result from a Chinook DB.  To run this you would need SQLite Library (http://sine.ni.com/nips/cds/view/p/lang/en/nid/212894) which can also be downloaded from VIPM.

This file is LV2014 version.

--
Ajay MV


0 Kudos
Message 7 of 10
(4,572 Views)

I think that this Video link might have been lost with the image, so i'll just post here again

http://screencast.com/t/kZgcJAy3KsMI

It gives quickdrop like functionality for whatever glut of strings you have, from enum or table or whatever.

0 Kudos
Message 8 of 10
(4,572 Views)

Norm: I saw the video, but where is the code?

0 Kudos
Message 9 of 10
(4,572 Views)

Ask and ye shall receive

http://www.screencast.com/t/LycwcwD2Dbu

QuickSearch

It's a combination of my code from modified others code, so not all is up to standards, but for the moment, it gets it out there.

It should feel very familiar to any LV user

0 Kudos
Message 10 of 10
(4,572 Views)