LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Any ideas for an interactive database interface?

Based on some user selected criteria, a VI gets a 2 dimensional array of strings from a database. What I would like to do is then associate a true/false value with each row in the 2D array which the user can check/uncheck to indicate they would like to get more information from the database related to that row of data. I haven't found any good ways to implement this. I would really like it to be a mouse click; not have the user type a string, like "yes" or "no".
0 Kudos
Message 1 of 6
(3,044 Views)
Make a 1-D array of booleans (you can use a boolean control, or a check box control from the Dialog Controls pallette). Put the 1-D array of booleans and the 2-D array of strings in a cluster. Adjust the size of the boolean control so that the boolean rows line up with the string rows. The user can click one of the boolean controls for the row he or she is interested in. To read which row the user checked, unbundle the boolean array from the cluster, then find the index of the row using the Search 1D Array function. You can use the Event Structure to determine when the user has clicked on a boolean control.
0 Kudos
Message 2 of 6
(3,044 Views)
You could display the rows in a multi-column listbox, make the selection mode 0 or more items, and all the user would have to do is click on the rows of interest. The output of the multi-column listbox is an array of selected rows.
Message 3 of 6
(3,044 Views)
Thanks for the suggestion, the main problem with that method is that the user would have to scroll BOTH arrays to view and select any row.
0 Kudos
Message 4 of 6
(3,044 Views)
Thank you very much. I have never had to use a multi-column listbox and after trying it out, I think it works pretty well. Thanks again.
0 Kudos
Message 5 of 6
(3,044 Views)
You could use a separate control rather than the built-in index controls, and use it's value to scroll both arrays simultaneously. Or, use an array of clusters rather than a cluster of arrays.
0 Kudos
Message 6 of 6
(3,044 Views)