Home
TeamSite
Auto-File Generation
jeetu
Hi,
I am using TS 6.5 on windows 2000.
i want to have Auto-File generation functionality similar to Auto-DCR naming.
Whne my user clicks on Generate button , TS should not ask to name the file. It should auto generate the file (with a file name that can be specified in the config files.).
Can i hard code the file name in templating.cfg.for example.... I want to generate file Myfile.html automatically when ever user clicks the generate button
I am not sure whether this functionality can be achieved.Any help on this is higly appreciated.
Thanks and Regrads
Jitendra
Find more posts tagged with
Comments
Migrateduser
It *can* be achieved but it would involve a bit of work on your part.
I recommend building a workflow that will kick off when the user clicks on FINISH (tt_data). This workflow could consist of only one task, which programmatically assigns the name of the generated file and then issues the command to actually do the page generation.
Dave
Environments:
(1,2) TS6.5, TS6.5SP1 on W2K3
(3) Vignette V7 Portal on Solaris 9
Bhargav Coca
Dave's solution is one and other way is you can hard code the generation of a particular file in your tpl. When ever user clicks preview or generate that file will be generated in the location specified by you in the tpl. This approach is basically used when you are generating any additional files out of your tpl along side of the html i.e properties files, word docs, xml's etc.
Thanks
Migrateduser
But doesn't that also invoke the "save as" dialog even though you're specifying it in the TPL?
Environments:
(1,2) TS6.5, TS6.5SP1 on W2K3
(3) Vignette V7 Portal on Solaris 9
dazzlad
Aren't we over complicating things here?
In the Form API docs, have a look at
IWPageGeneration.setOutputFile
IWDCRInfo.setDCRName
These should allow you to name DCR and generated file without any prompts.
Darren.
Migrateduser
Aha, thank you! I haven't had to do anything like this since 6.1 and this is a feature new to 6.5. Yes, it is that simple... but I like to "workflow-up" (and therefore log) as much as possible
but what you suggested would be the best thing.
Thanks!
Environments:
(1,2) TS6.5, TS6.5SP1 on W2K3
(3) Vignette V7 Portal on Solaris 9
dazzlad
I agree that it would be nice if you could log these formapi events.
I guess that you could build up a javascript string describing what took place and then use a form api remote server call to append it to a logfile somewhere.....
Darren.
Migrateduser
An advantage to doing this via workflow is that you could spend one or two additional external tasks to perform some custom operations -- like figuring out if the file already exists and if so, start a child workflow to try and resolve the conflict, etc. I love to hack around with Javascript and try to stretch it until it bleeds (sorry for the imagery) but workflow seems to afford so much more customization and scalability, if needed.
Dave
Environments:
(1,2) TS6.5, TS6.5SP1 on W2K3
(3) Vignette V7 Portal on Solaris 9
jeetu
Thanjs Darren and Everybody involved in thid discussion,
I will try to work on the option provided by Darren and let everybody know it.
Thanks again
Jitendra
chartapiqueryexplaination.jpg