When an app goes through version changes that change data structure, templates must change as well. However, in lieu of updating the records to match the new structure (not always easy), it would be useful to allow output to PDF based on legacy templates that match the older data structures.
The simplest way to do this would be to allow selection of templates based on some criterion for the older records. The simplest way might just be comparing a timestamp with a literal datetime in the expression; if the record's timestamp predates an update, use template yadayada. The templateIDs could also be in a lookup table, associated with some other columns in the main records.
I'm hoping that because expressions are so commonly used in so many areas of AppSheet, that they could be employed here as well. It seems natural to do this with the actual file identity, inasmuch as even the folder path is presented as an expression. Heck, make even the content type an expression.