Replicating records is not a good solution here.
You should never have duplicate records in a child table.
Why not just go to a layout based on the child table and run a find script?
from the context of the parent TO...
Go to child layout
enter find mode
set error capture on
set error capture off
if get found count = 0
print child records
Basically, I have a portal which which enables users to filter related records from two tables.
I want to add a function which saves the record for example a user may apply different filters and get some records, I want user to be able to save those records filtered in portal. So every time, user filter records, he click the save button, the filtered records can be saved as pdf.
I used GTTR, it does work, but I have to write very long script for each filter. So I wanted to duplicate filtered records on print/save layout.
just duplicate the filtered portal (as you have it for the list), but make it ONE ROW. put the GTRR button in that single row and then when called, it will honor the filtering you already have (even if dynamically set).
See an article I wrote and one side-effect with GTRR: