I am using below code. I wanted to extract either order ID or invoice ID or sometimes both from an .xml file. But it is giving below error: Assign: Index was outside the bounds of the array.
If anybody can help??
Attaching all relevant document…plz help New…xaml (19.4 KB)
Data used here: Data.zip (3.7 KB)
This means you are trying to reference an item in a collection that doesn’t exist. Say there are 5 items in the collection (index 0-4) and you try to reference item(5) - you’ll get this error.
The expression try to iterate 2 items from arr1.length. However arr2 and arr3 has only 1 item, then throw exception. Perhaps you should review your expression.
I’m not sure what you want to do by this expression. However, for now, can you try to modify from arr1.length to arr2.length, as the following?
(From x In Enumerable.Range(0,arr2.length)
Let a = "LabelA: " & arr1(x)
Let b = "LabelB: " & arr2(x)
Let c = "LabelC: " & arr3(x)
Select res = String.Join(Environment.newLine, {a,b,c})).toarray