2022.1

Table Of Contents
l Refresh Types: Updates field types to match the types in the active data model.
l Options (only available in the Text Script wizard and the Dynamic Image wizard):
specifies where and how the script inserts its results:
l As HTML. HTML elements in the results are processed and displayed as HTML
elements. For instance, <b>this is bold</b> will be displayed as this is
bold. This is the default setting.
l As text. This inserts the results as-is, meaning HTML tags and elements are
displayed as text in the output. In this scenario, "<br>" shows up in the text and does
not insert a line break.
l As the value of an attribute of an HTML element. The selector of the script should
be an HTML element. Which attributes are available depends on the selected
HTML element. If the script's selector is an image (<img> element) for example, and
the attribute is src, the script will modify the image's source. The script's results
should be a valid value for the chosen attribute.
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. The expanded script will use either
double or single quotation marks, depending on the Preferences (Window > Preferences
>Scripting; see "Scripting preferences" on page913).
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918.
For an overview of keyboard shurtcuts that can be used in this script editor, see "Keyboard
shortcuts" on page1100.
Page 1071