Hierarchical storage with pattrstorage?

Peter Ostry's icon

Can I tell one pattrstorage to control another one?

Scenario:
I program for a MIDI controller. There I select a program number which has a couple of program-specific settings stored. Once in the program, I can press some buttons to perform several actions. When I change the program, the buttons do other things. Means, I need one storage for the program number and associated parameters and one storage for the individual buttons and their actions within the particular program.

I tried with two pattrstorage objects, two autopattr and so on, cannot get a clue how to do such a hierarchical structure. Maybe with one preset object for the programs and one pattrstorage for the associated button-sets?

How is that usually done?

Btw, I am on Max 5.1.7