| Id: | 20955 | 
| Product: | finPOWER Connect | 
| Type: | NEW | 
| Version: | 4.01.00 | 
| Opened: | 13/11/2023 | 
| Closed: | 18/12/2023 | 
| Released: | 29/04/2024 | 
| Job: | J032419 | 
|  High Importance | |
Scripts; Template Text; Can now use "#include" directives to include a "Function Library" Script's Template Text
The "#include" directive has been available to Script Code since finPOWER Connect was released.
This type of directive can now be used by HTML Widgets to include a Function Library's Template Text (usually HTML or JavaScript or both) into the Template Text.
NOTE: This relies on the Script's Template Text being returned as follows (as it is in all system-supplied HTML Widgets):
' Handle EventsSelect Case eventIdCase ""' Main event, i.e., return initial HTML content (excluding html and body tags)returnValue = ScriptInfo.TemplateTextEnd Select
The following is an example of an HTML Widget's Template Text using this directive:
<h2>Begin - In the main Script</h2>#include "J032419.FL"<h2>End - In the main Script</h2>
A new "Info" button is shown below the Template Text field on the Scripts form, detailing how the new "#include" directive is used.
Right-clicking in the Template Text field allows you to insert a "#include" directive from a list of Function Library Scripts that define Template Text.
NOTE: In the Script Code field, the list of available Function Library Scripts shown when right-clicking now only includes Scripts that define Script Code.