I have two arrays, a primary and secondary array. Each array is composed of cluster elements (name string, numeric value). The primary array is in the correct order that must not change. The secondary array contains the updated numeric values for corresponding name string. However, the elements in the secondary array are not in the same order as the primary. How would I do a swap so that the Primary array now contains the updated values and remains in the same order.
I have created an example VI (LV 8.2) (which I thought would work) that only puts in the first element and then all data stops being passed after that.
This example contains two arrays with cluster elements containing a name string (color) and numberic value (integer).
Primary Array
Red 24
Blue 21
Green 75
Black 4
Yellow 5
The seconday array (updated numeric values but in different order)
Blue 2
Black 77
Yellow 1
Green 444
Red 12
The Final Array (Primary Array updated with new values) should be
Red 12
Blue 2
Green 444
Black 77
Yellow 1
Remember that changing the order of the Primary/Final array is not allowed.