Example Code

Search spreadsheet for partial match

Code and Documents

Attachment

Overview
This app searches a column of data for a partial string match, and displays the current search results in a listbox. Clicking on an element in the listbox shows the corresponding element of the second column of data.

 
Description
This application loads 2 column data from a spreadsheet file (txt) and uses it to populate a listbox with entries. Upon starting to enter values in the search box, the listbox witll update with values that partially or completely match your search. You can click on an item to generate an event, which in turn retreives the element of the same index from the next column, in this case a phone number corresponding to a name.


Requirements

  • LabVIEW 2013 (or compatible)

Steps to Implement or Execute Code

  1. Open project file
  2. Open the Get Phone Number VI
  3. Run the VI
  4. Enter a random letter in the search box to see names containing that letter appear
  5. Click on a name in the results box to see the phone number assigned to that name

Additional Information or References

240.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

 

Matt H
Applications Engineer
National Instruments UK

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.