Merging groups with "smart templates"

Something like Script: Create custom date register?