04-02-2010 02:57 PM
In the attached 3D array I want to delete all records that do not have 3A900000/3A900001/ or 3A900002 in field 2. Is there an easy way to do this?
Thank you.
Solved! Go to Solution.
04-02-2010 03:56 PM
chuck72352 wrote:In the attached 3D array I want to delete all records that do not have 3A900000/3A900001/ or 3A900002 in field 2. Is there an easy way to do this?
Thank you.
Easy is relative , but I think people will be able to answer this better if you give some more detail. However, no matter what detail we may get, people will tell you Don't use delete from array in a loop! You will want to search the forums for how to avoid this. Lots of examples. Second, what is "field" two. Is it a row, a column, or a "page"? Remember, in certain situations your array will be padded to hold dimensions properly. You can't just have a 2d array with some rows length 5 and some rows length 4.
04-02-2010 04:45 PM
You can't delete rows from any page in a 3D array because that would upset the number of rows, which must remain the same for all pages. Wire the array into a For Loop with indexing enabled. This will give you each page. Use another inner loop to get each row. Look for the desired number in column 2. If found, then overwrite the entire row with blank strings. This will preserve the number of rows for each page of the 3D array.
04-02-2010 07:05 PM
04-02-2010 07:16 PM
04-03-2010 06:35 PM
Here's my attempt to delete all records on each page that don't have 3A900002 or 3A900001 or 3A900000 in the 2nd column. How can I make it delete an entire record (row) instead of just the value in the fifth column.
Thank you.
04-03-2010 08:08 PM
OpenG have some useful VIs for array operations such as the following which might be useful to you:
You can download at:
04-03-2010 08:10 PM - edited 04-03-2010 08:10 PM