Allowing users to generate templates on the fly is obviously a great update for AppSheet. This feature request proposes an easy way to do it:
In addition to being a simple change, now with the new ability to launch Apps Scripts from within the app, I believe this is an excellent time to introduce this feature.
Thank you!
By "on the fly" I meant dynamically during the app's runtime. The template change in this case would be initiated by the user or the app's automation, not by the creator. This is the idea.
Here's my desired scenario. I want to generate a report, but based on the data being represented, I want to be able to choose between different preset templates automatically while the app is running. If the app's creator can specify a /path/filename instead of DocID, in this case, a script can be launched from within the app to copy the desired template to overwrite the existing template file. I have seen that the template is loaded each time a file is to be generated without requiring a save to the app's definition, so I believe this dynamic file replacement is possible.
If the template field in the task, not only accepts a static /path/filename, but would also accept an expression, oh that would be awesome, you wouldn't even need an Apps Script.
Another desired scenario, I have two apps for the same customer (with a single launcher), a wide-audience app and a control app available to administration that controls the behavior of the wide-audience app, for example permissions, but not only that. With a /path/filename, it would be possible for the users of one app to set templates for another app (with relevant folder permissions).