Showing results for 
Search instead for 
Did you mean: 

combo box has problem getting the correct value from selection

is there a known problem with combo box?
I'm using different values for the display strings and their corresponding values.  When I have 2 identitical display string but different corresponding values, LabVIEW tends to get the value of the first appearance.  For example, if I have this combo box:
Display String          Value
abc                           0
def                            1
abc                           2
If I select the second "abc" from the combo box, the value of the combo box becomes 0 instead of 2.
0 Kudos
Message 1 of 8
Hello See-Ming,

I tried to reproduce what you've said under LabVIEW 7.1.1 and it works as it should...

I couldn't open your vi because I don't have LV8... maybe this comes with 8 Smiley Surprised

Could you try to open my vi with LV8 and tell me what happens ?

Message Edité par TiTou le 03-31-200609:32 PM

We have two ears and one mouth so that we can listen twice as much as we speak.


Antoine Chalons

Download All
0 Kudos
Message 2 of 8

I tried your VI, and when I select the second abc, string came up to be 0...

maybe it IS a special feature in LV 8....

oh well... I went around it by adding index in the display string, but it's kinda annoying...

Thanks, ^_^


0 Kudos
Message 3 of 8
Good catch See-Ming

"Un train peut en cacher un autre" (anybody for a translation ?)

In LV 8, on MacIntosh, trying to edit the stings in the comboBox, I got a message saying that duplicate strings were not allowed. That could have explained your result.

However, the inconsistency between LV7 and 8 is not justified. And there is no error message under W2K !

Moreover, upper and lower cases are not distinguished : the item editor consider that the strings are different (on MacIntosh again... On PC the editor is completely dumb !), but, at run time, they are found identical, returning the same index value. This is clearly a bug !
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
Message 4 of 8
Hi CC,

Thanks for the additional information, I already put this in the Mach bug list, link.

We have two ears and one mouth so that we can listen twice as much as we speak.


Antoine Chalons

0 Kudos
Message 5 of 8

I tried the upper case and lower case thing, and the combo box returned with the correct value (return ABC when I select ABC and abc when I select abc)

I guess it's different between windows and mach...


* Thanks TiTou ^_^

0 Kudos
Message 6 of 8
My reply got in the wrong post, apologies.  Was attempting to post in

Message Edited by Dillon G on 04-04-2008 10:05 AM
0 Kudos
Message 7 of 8

Combo Box Strange Behaviour in Case of Using an Undefined Item:


During run time como box allows to enter a string into the undefined row, however in this particular case it does not return the value but the string instead. Look at the combo (lv 8.2) attached.

Balint Juhasz, Hungary, Budapest


0 Kudos
Message 8 of 8