The Script Files

 <  Day Day Up  >  

A form template may have zero or more script files. When you access the Script Editor to create a function or subroutine, a script file is added to the form template when it is next saved.

The Default Script File

If a script file is present in a form template, it is present in the form template as script.js or script.vbs . That file contains all functions or subroutines created from the InfoPath user interface.

Other Script Files

The InfoPath developer can create additional script files using a tool other than InfoPath and include them in a form template, using the InfoPath Resource Manager. For example, if a set of calculations is common to several forms your company uses, it might make sense to create functions or subroutines that encompass the relevant functionality and call those well- tested and (for your company) standard business rules, rather than have to write and test them from scratch each time.

MAINTAINING SCRIPT FILES

If you plan to include a custom script file in several form templates, you should consider the implications of updating the business logic. If, for example, new business rules are to be applied, you will need to ensure that all relevant form templates are updated. If you have a handful of InfoPath form templates, that won't be too much of a problem. However, if you have dozens of form templates, it could save a lot of time if you have documented each form template and what custom script files are used in each.


 <  Day Day Up  >  


Microsoft Office InfoPath 2003 Kick Start
Microsoft Office InfoPath 2003 Kick Start
ISBN: 067232623X
EAN: 2147483647
Year: 2004
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net