2018.1

Table Of Contents
l
When checked, the option Convert fields to JSON string writes the results from
the script into an attribute or text as a JSON string. This is useful for Web contexts
where a front-end script can read this value easily.
l
OK: Click to save any changes made to the script, apply the changes in the template, and
close the dialog.
l
Cancel: Click to close the dialog without saving changes.
l
Expand: Click to convert the script generator to a regular script. Note that this action is not
reversible once the regular script has been saved.
l
Apply: Saves changes made to the script and applies the changes in the template
without closing the dialog.
Expanded Script window
When expanded, the Script window replaces all parts of the wizard below the Selector by a box
in which the script can be typed. See "Writing your own scripts" on page323.
For an overview of keyboard shurtcuts that can be used in this script editor, see "Keyboard
shortcuts" on page427.
Chart Script dialog
The Chart Script dialog specifies which variable data will be displayed in a chart and shows a
preview of both the chart (on the right hand side) and the data (at the bottom). This dialog is one
of the parts of the Insert Chart wizards. It can be reopened by double-clicking the relevant script
in the Scripts pane.
For more information about charts, see: "Business graphics" on page214.
These are the options in the Chart Script dialog:
l
Name: The name of the script, making it easier to identify it.
l
Selector: The Selector or Text to apply the script to.
l
Selector: Uses CSS selectors to find the element to which the script applies. (See
also: "Selectors in Connect" on page360.)
l
Text: Uses text as a trigger for the script. The script applies to all instances of the
text found in the template.
l
Selector and Text: Uses text within the specified Selector as a trigger for the script.
Page 408