Script Generators
Script Generators are simplified interfaces for common scripts in Templates.
These are the different Script Generators that are available.:
- Text Script: The default script that is created when a Record Field is dragged on to the page.
- Dynamic Image Script: This script can be added and, providing it refers to an image by selector, can dynamically change the image for each record.
- Email To Script: This script is automatically added on any new Email template or Context and defines the email address where each record output is sent.
- Email Subject Script: This script can be added to Email contexts and defines the subject of the email that is sent.
-
QR Code Script: This script controls the contents of QR Code Objects.
-
Pie Chart Script: This script controls the contents of Pie Chard Objects.
Here are the options visible in Script Generators:
- Name: The name of the script, making it easier to identify it.
- Find: The Selector or Text to apply the result of the script to.
- Selector: Uses CSS selectors to find the element to which the script applies
- Text: Uses text as a trigger for the script. The script applies to all instances of the text found in the template.
- Wizard Results: Displays a list of the data that is sent to replace the result of the script:
-
- Prefix: Static text to use before the set field. For example in Dynamic Image scripts, the default prefix is images/.
- Field: A drop-down to select which field contents to use in the script. Note that only fields from the Record tab are displayed, not from any detail tables.
- Format: A special formatting modifier applied to the Field. Currently the format function must be typed in manually. Two format functions are available (note that function names are case sensitive):
-
- toUpperCase : Changes all letters in the Field's value to uppercase.
- toLowerCase : Changes all letters in the Field's value to lowercase.
- Suffix: Static text to use after the set field. For Dynamic Image Scripts, the default suffix is .jpg and refers to the file extension.
- [+] : Adds a new line to the Wizard Results. Note that by default there is no line return between fields in the list. Adding <br> in the Suffix or Prefix field can establish a line return.
- [-] : Removes the currently selected line in the Wizard Results list.
- Arrow Up: Moves the currently selected line up one position.
- Arrow Down: Moves the currently selected line down one position.
- OK: Click to save any changes made to the script, apply the changes in the template, and close the dialog.
- Cancel: Click to close the dialog without saving changes.
- Expand: Click to convert the script generator to a regular script. Note that this action is not reversible.
- Apply: Saves changes made to the script and applies the changes in the template without closing the dialog.