From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

selecting a string from a string array

Right now i have the user input the first char of a string they what to search for.  Then it searches for any string that has that char in the first index place for example the 1D array is 111 222 333 122 344 112 and if the user inputs a 1 then the result is 111 122 112. I have that working what i need help is now i want to take that new 1D array and what ever the user selects then that string from the new 1D array will be displayed.  Like i said i can go as far as get the new 1d array of string but i need help with the selection of the string from the new array any help will be greatly appreciated
 
 
 
Brandon
0 Kudos
Message 1 of 10
(4,098 Views)
i am using 8.5
0 Kudos
Message 2 of 10
(4,095 Views)


brandon20 wrote:
I have that working what i need help is now i want to take that new 1D array and what ever the user selects then that string from the new 1D array will be displayed.  Like i said i can go as far as get the new 1d array of string but i need help with the selection of the string from the new array any help will be greatly appreciated

Hi Brandon,
which selected string do you mean? If the user can change the selection, i recommend to use an event structure.
Mike
0 Kudos
Message 3 of 10
(4,086 Views)
what i meant by select the string is that the user can highlight one of the strings from the new array and which ever one is highlighted then that one is displayed.  So as for the Vi i attached in array 2 you would click highlight one of the strings in that array and then from there it would display it in its own indicator  i hope this clears up everything
0 Kudos
Message 4 of 10
(4,073 Views)
how bout this.
this will display the array with the searched values in a listbox. Then when you select the value in the listbox the number will display.
0 Kudos
Message 5 of 10
(4,063 Views)
That will work out great!! thanks so much for all your help
0 Kudos
Message 6 of 10
(4,057 Views)

Hi Brandon,
here is another method to get your "sub array" without using the delete from array function.

Hope it helps.
Mike



Message Edited by MikeS81 on 05-23-2008 05:15 PM
0 Kudos
Message 7 of 10
(4,050 Views)
I have one more question on this topic the VI that was given works out great except that you have to click outside of the box for it to register that there is a value there is there any way that once you type in a value to search with it will automatically update the list box without having to click outside the box
0 Kudos
Message 8 of 10
(3,973 Views)
What you do is right click on the Search Part Number string control.  go to Create > Property Node.  the scroll down to Update While typing.  right click on it and change it to a Write and then wire a true constant to it in the while loop.
0 Kudos
Message 9 of 10
(3,967 Views)
Wow its just that easy nice thanks alot
0 Kudos
Message 10 of 10
(3,960 Views)