Hi @JasonMark
Some thoughts:
-
The scripted approach you mentioned is a reasonable option, but I'd mention that I would not navigate from record to record; instead I would use the GetNthRecord function to allow me to traverse data in the found set. Limitation: GetNthRecord won't help you directly gather data which is related to the found set in the same way (i.e. one or more hops away).
-
The use of the While function, in conjunction with GetNthRecord can work similar to the above. One thing I like about this is that sometimes it's nice to be able to work out the details of something like this, and encapsulate it in a CF that I can use elsewhere, too.
-
Along the lines of CF's, I'd suggest looking for a copy of Agnes' "CustomList" function, which offers a very powerful tool for the types of tasks that you are describing.
-
If it were just one field that you needed to collect from each record, the ListOf summary field could help, but I'd really only reach for that option if I need to use this frequently, and with high performance.
-
I've heard other devs mention that they would consider exporting CSV data of the target fields from the found set, and then use the File reading functions to read the data back into memory from within a script. I have never done this, and though I don't rule it out as an option, I don't suspect I'll be doing it soon, but I do have to say that I appreciate the ingenuity of it. I imagine it could have a useful place of the found set is huge.
-
I also once mocked up a technique for scraping data from a found set into a global field by using the Replace command. I don't advocate that one, however, because the Replace command can show a dialog that can be confusing to the user.
I guess that's a few ideas for now. Circling back, I'll reiterate that I think your scripted approach is a fine way to go, but again emphasizing that my preference is to use GetNthRecord instead of navigating the found set.
HTH.