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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Apply filters to multi column list box

Hi,

 

I have an application where I am reading Excel sheet and displaying the data in MC column list box.

I need to have a provision where user can apply filters on Column Header. The filter view shall populate all the data in that respective column and with checkmarks placed I can select only necessary data to view

Is it possible?

If yes, a sample VI would be really helpful.

 

0 Kudos
Message 1 of 4
(1,782 Views)

@SuLAB wrote:

Is it possible?

If yes, a sample VI would be really helpful.


Sure, that's possible.

 

Problem is there are tons of ways to do it. Each way will be quite some work (like, hours-days).

 

How do you get the data from Excel?

 

How do you want to filter? Text? Regular expression? Value? Value range? Each column it's own filter? Etc.

 

What in particular is the problem to make this? The GUI? Handling the data? Handling the events? The filtering?

 

I'd probably use a SQL query to get the Excel data. Then the filters could (maybe) be translated to the query, and a new query with changed filters would simply return the filtered results.

0 Kudos
Message 2 of 4
(1,765 Views)

Hi,

 

Please find answers to your questions as below - 

1. I get the data from  Excel in 2d array of string  which I pass to MC Listbox.

2. The application need is same as that of Excel filter.

When applied it should populate all the data in the respective column with checkmarks against it the search option, ok and cancel button.  PFA screenshot for reference as in Excel.

SuLAB_0-1608736177280.png

3. I would say, I need all of these together in this application. So that I can view the data, filter it, ,make necessary changes in the selected data, and save back to excel

 

I really don't know SQL and need simple ways to achieve it if there are any.

 

0 Kudos
Message 3 of 4
(1,745 Views)

@SuLAB wrote:

I really don't know SQL and need simple ways to achieve it if there are any.


There isn't.

 

This will require work. This isn't absolute beginner stuff. Of course you can raise the bar and learn... 

 

I don't have a clear recollection of how the filters work in Excel..

 

I'd start with abstractions. This is not something that is going to work well (maintainable, extendable) in a one liner. This requires logic that simply won't fit in one big main VI.

 

You'd need a good 'divide and concur' tactic. For me, that would mean doing a OO breakdown. But any separation into libraries, groups, functionality would be better than the one liner.

 

 

0 Kudos
Message 4 of 4
(1,713 Views)