LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"combo box input"

Hey, I'm trying to save a user's name in a combo box so that the user can just selet their name from the drop down menu next time they use the program. Is the a way to edit the attached VI such that multiple entries of the same name (array value) are not saved in the array/combo box??

0 Kudos
Message 1 of 5
(2,998 Views)

You can just place the build array and the property node outside the loop. An event structure would work too.

If you want to use a while loop and not an event structure, you really need to add a wait inside the loop as shown below.

0 Kudos
Message 2 of 5
(2,990 Views)
I attempting what you suggested, however I'm still runnig into the same issue. If the user selects (or re-enters) a previous value already in the combo box, multiple values of that entry are saved. How can I compare (or something) the Strings property node  to the build array to check and see if the enter values already exist in the array, and if so, not save that value in the array? I attached a picture of the front panal to better explain my situation.
0 Kudos
Message 3 of 5
(2,972 Views)
I would use an event structure and in the value change event, have a Search 1D Array function. Wire the Strings[ ] property to the array input and the user entered string wired to the element input. If the index of element is less than 0, it doesn't exist yet and you can exit. If 0 or greater, it's already been entered so you can clear the input and prompt the user to enter something else or exist without adding a new entry.
0 Kudos
Message 4 of 5
(2,961 Views)
I couldn't really figure out how to use the event structure so I took another route. It might not be the best programming but it seemingly works with a minor problem. The values in the array are not permeantly saved in the array. In otherwords, when I exit LabVIEW all array values are cleared. This problem only exits with the "Race Info XI.vi". The "Combo box input.vi" array values do remain once the program is exited. I've had this problem before with the "Race Info XI.vi" and I just rebuilt the vi and it worked. For some reason, that method of rectification is not working this time. Any suggestions?
Download All
0 Kudos
Message 5 of 5
(2,936 Views)