Some courses and learning paths on NI Learning Center may not appear on learner dashboards. Our team is actively investigating.

If you encounter access issues, please contact services@ni.com and include the learner’s name, email, service ID or EA number, and the list of required courses.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subset string array

Hi all,
 
I have a string array that contains Day0, Hour1, Week5, Day3, Year3, Day4, Hour0, Day5, Hour3, Day2, Week0, Week3... (these are randomly mixed).
Now, from this array, I want to create another array that ONLY contains the string 'Day' (Day0, Day1, Day2, ...).
I tried several things but it wasn't successful. The attached VI only provides the last 'Day' element.
Could anyone help? Thanks,
 
Yoon,
0 Kudos
Message 1 of 3
(2,910 Views)
Of course it provides only the last element. Each time you have a true case, you overwrite what any previous true case has created. You need to use a shift register with a build array in the true. This would be almost identical to the shipping example called Building Arrays. If you were to open the example finder, you would see this under Fundamentals>Arrays and Clusters.
Message 2 of 3
(2,909 Views)
Thanks a million.
0 Kudos
Message 3 of 3
(2,901 Views)