LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically update Combo box won't update its Local variable

Solved!
Go to solution

Hello all,

I followed a tutorial from NI website and programmatically edit items in a combo box. It worked successfully but not for the Local variables. Local variables still retain items that it had before.

Any suggestions ?

 

Thanks !

 

0 Kudos
Message 1 of 5
(3,189 Views)

The Strings[] property node contains a list of all possible values user can select from the front panel.

 

This property doesn't change the value. The local variable returns the value selected.

 

What do you need to do more precisely?

 

Cheers,

0 Kudos
Message 2 of 5
(3,178 Views)

So I understood that string[] Property node modifies the list of items that the user can select and the Combo box local variable returns a value that user selcted. But what I still don't understand why the indicator of the Local variables contains old list items ? In some way, I thought once I write a new list into string[] Property, the old list should be gone then.

0 Kudos
Message 3 of 5
(3,164 Views)

It's not the local variable that has different items.  It is the indicator that has a different list of items from the control.

0 Kudos
Message 4 of 5
(3,155 Views)
Solution
Accepted by zigbee1

You need to programmatically update the value property in order to change what the local variable will return, the value that you will wire doesn't have to match with one of the Strings[] array.

 

Perhaps you need to do something like this to update your value to change from "Two" to "Five".

 

Untitled.png

0 Kudos
Message 5 of 5
(3,147 Views)