I'm not sure if this is similar to the technique Chris mentioned in a somewhat cryptic comment on another templating blogpost.
I use a naming convention for three kinds of fields. To do the actual transformation, I use a WebQueryOpen-agent.
Naming convention/description
lup_[label]
Model
Computed for display, allow multiple values. These fields fetches the data (using dblookup/-column). One field can be used by multiple templates.
template_[label]_[description]
Controller
Computed for display. These fields contain the description of how the data should be transformed. The label should correspond with the label of a lookup-field. Example of template.
transformed_[label]_[description]
View
Computed for display. These fields will be filled by the result of the transformation. The label/description should correspond the label/description of a template-field.
WebQueryOpen agent
Controller
This agent contains the transformation logic/fills the transformed-fields.