06-03-2016 10:30 AM
hey guys,
Im pulling data from a database and storing it as a cluster of 1D arrays, and now I want to find an element in one array using the other array. after getting the two individual arrays I try and search one using search 1D array comparing to a value Ive already generated. I was hoping to use the index from search 1D array to grab an element at that index from the other array.
Currently the array im trying to search has one element, the element im trying to find, but I keep getting a -1 back.
can anyone see what I'm doing wrong here? is there something I dont understand about search 1D array?
Thanks guys
Solved! Go to Solution.
06-03-2016 10:41 AM
A common issue here is white space (spaces, tabs, new line characters, etc). Try using Trim Whitespace on both the search string and the items in the array before searching.
06-03-2016 10:42 AM
Hello pathare535,
Your code is correct, it work for me.
The problem might come from your data.You should use debug tool to check the data.
Regards
06-03-2016 12:08 PM
did the trim white space on both strings and that fixed the problem.
Thanks!