08-18-2022 12:00 PM
Here's what I would do to get either the first N or the last N Atl records. Pick what you really need and delete the rest.
08-18-2022 12:11 PM
@BrianK75 wrote:
I was finally able to limit the number of desired records from an array using a for loop and an Insert into Array.vi
While the rest of the code is very convoluted too, the "insert into array" is completely pointless, pure Rube Goldberg, and not needed here.
Here are two possible alternatives that give the exact same result:
08-18-2022 01:34 PM
Sorry for the delay. This is what you asked for. I deleted all of the Report Generation Toolkit (Excel) VIs.
08-18-2022 02:14 PM
Thanks. I think I already solved it for you. Have a look here above.
(Next time, also provide a typical default value for the numeric control. A default value of zero is not typical and would not require any code at all to generate the output. 😄 )
08-18-2022 02:30 PM
Thank you!
Very true. I normally have defaults set in my code. However, this particular piece was going to be a list of ever changing information. I guess a default controal array is just as good as any list to work through the sorting and filtering aspect of things.
08-18-2022 03:12 PM
Note that my solution works mostly in-place and does not allocate memory for the subarray of all Atl records and other intermediary data structures. Even the sorting by date could be implemented with a tiny amount of extra code.