Jump to content

Excel Like Autofilter for table


lcosta

Recommended Posts

Hi,

Currently I'm recording and showing to the user a LabVIEW table but I wanted to deliver a user controlled filter, like the Excel Autofilter.

The table can hold up to 5000 lines and the lines can have different colour schemes. When filtering the table must be rebuilt in order to comply with each line previous colour scheme.

Any ideas?

post-2702-1168355075.jpg?width=400

Link to comment

I believe that OpenG has what you want - a Remove Duplicates from Array VI and a Filter 1D Array VI.

You use the Remove Duplicates VI to generate the list for the ring and the Filter VI to get the indexes of your desired elements and use those indexes to extract the lines you want.

I suggest you keep the actual data in another array (both color data and the actual values) and extract the data into your table every time you change the filter.

Link to comment

Thanks for the input,

I've just tried out your suggestion but my problem isn't the filter implementation itself. The main problem here is to apply the colour changes. If a row is removed, the colour scheme of that line must be also removed, as the cell colour is a table property all the rows after the removed one require a update one cell at a time.

Example:

Row #1: Failed -> RED

Row #2: Passed -> GREEN

Row #3: Failed -> RED

Row #4: Passed -> GREEN

Row #5: Failed -> RED

By removing the 2nd Row the result should be:

Row #1: Failed -> RED

Row #2: Failed -> RED

Row #3: Passed -> GREEN

Row #4: Failed -> RED

Conclusion: Removing Row #2 requires an update of the table properties in order to adjust the rows to the colour scheme. In a table with a couple hundred rows the table re-adjustment requires a lot of processing time.

I

Link to comment

Don't keep the color information in the table. Hold it in another array and apply it to the table whenever you change the data in the table.

To handle the drawing time, set the Defer Panel Updates property to true before updating the table. This causes the display not to update until you set the property back to false and will make it go MUCH faster. The property itself belongs to the front panel.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.