From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-13-2017 06:20 AM
Hello guys,
I have a noob question.
I try to search with "Search 1D Array" function into an elemens of array.
In this elements I have same element in diferent rows.
If I run the "Search 1D Array" i receive only 1 index.
The question is:
How to find all indexes for that element ?
Thank you for your help!
Solved! Go to Solution.
02-13-2017 06:26 AM - edited 02-13-2017 06:33 AM
Hi a,
read the help for this search function.
Then use the 3rd input, which you have left unwired so far!
General comments/hint:
- clean up your BD, especially around the Search1DArray function: from your image it is unclear which wire is connected to which function input/output!
- Answer the question: Where should the search function start its search, when I want to find elements after the one element I already know?
02-13-2017 06:28 AM
Use a loop. The Search 1D Array has an input for telling it which index to start searching at. So you can use a shift register to tell it to start searching at the element after the last one found.
02-13-2017 06:49 AM
In this case i'd loop through all elements and build a new array of the selected ones.
/Y
02-13-2017 06:51 AM
Hello GerdW,
I have read the help for search function. I want to start from index 0 because I dont know where will be the element (in wich row of column).
If you see, I read the column 4 of the table dbo.WeighingCleaning and, in this table I need to find in wich rows exist my "Cod DMC" element. This element could be in more rows.
After I find all the rows I will be able to prind this rows and comapre the data.
Thank you!
02-13-2017 06:57 AM - edited 02-13-2017 06:57 AM
02-13-2017 07:05 AM
I want to search the first element after the one element that I have found. (if I have understood your question)
02-13-2017 07:14 AM
02-13-2017 07:15 AM
Thanks crossrulz
With your solution I have solved my problem.
02-13-2017 07:17 AM
Because I dont know how to do that.
How to start search after the index that I have found ?