Acting on the records within a sub summary of a sorted found set

Discussion created by on Apr 23, 2016
Latest reply on Apr 23, 2016 by


I think I know the answer to this already but want to put it out there in the hope that I'm wrong and also to try an elicit a more elegant solution than the one I have imagined.


Here is the context. (learning how to suck eggs)

There is an 'Item' table with 4 attributes (Type, Style, Size, Color). On the 'FIND' layout  these are presented hierarchically as hierarchically populated dynamic checkbox lists.

If a user selects values in the highest level of the hierarchy (Type) they would see all options for 'Style' for this 'Type' value. If they select none of these Styles and perform a  find they will get all records of Type for this value for all Styles, Sizes and Colors.

If they select one or more styles they would see all options for Size for the Style/s selected  and if they perform  a  find now they will find all Sizes and Colors for the selected Types and Styles.

And so on...

So the search criteria can be broad or narrow and the found sets will be correspondingly large or small.

Found sets are always sorted in the hierarchical order (Type, Style, Size, Color)


Now my problem ...

Each record of the subsets at the lowest level (Color) from the entire found set needs to have a sequence of scripted actions performed on it. AND this is where it gets funky. I need to change to another layout and print a document with the subsets values for Type, Style, Size and Color (as well as others) BETWEEN the iterations on the sets at the level 'Color' .


  1. Find the records
  2. Sort the records
  3. Print the 1st Color subset's document
  4. Do things to the records in the 1st Color subset
  5. Print the 2nd Color subset's document
  6. Do things to the records in the 2nd color subset
  7. Print the 3rd Color subset's document
  8. Do things.......
  9. etc.
  10. Do things to the last Color subset's records


SO is there any way to work within the subsets defined by sub summary parts iteratively or will I have to do some version of a specific find for each  subset of Color that could exist from the original full found set as defined by the users selections.


Cor! that was a bit long winded.

Thanks for your patience and for following along.

Ideas gratefully received.