Scripted Record summary

Scripted Record summary

We are currently using a form that contain many customisable products. The user customer can choose to use one or many of these. 

This was simple to solve in the form by hiding unused products, however when the customer has only chosen one product in the form the record summary still displays all of the options.

My question is, is it possible to script the Record summary so that entries only show options that have been used? Or are we able to switch Record summary templates via a script when the Record is added.

Any Help would be greatly appreciated.

Thanks,
Glenn.