It is possible to run code in a work flow form from an external file.

 

In the on form load script, include the name of the file. In this case we’re using Borg.js

 

 

 

The file should be located in the following directory (the location of the form).

 

Then in any other script in the work flow form, (eg. on data bound for a data grid), you can just call the functions from that file.

 

Calling the external functions in the workflow form.

 

 

The decodeXML function in Borg.js

 

So why would you want to do this?

This allows us to keep work flow forms fairly generic, while being able to keep site specific configuration (eg. showing / hiding or renaming columns in a data grid or decoding xml) in a separate file that is easy to modify.