Creating Calculations and Scripts

Designer provides a wide range of calculation and scripting features that you can use to perform a variety of tasks. For example, the following script changes the color of a text field border and the font size of the text field value:

TextField1.border.edge.color.value = "255,0,0"; TextField1.font.typeface = "Courier New";

More complex forms can take advantage of scripting to perform data source connectivity and data manipulation at run time. For examples of common scripting tasks, see Examples of Common Scripting Tasks .

Creating calculations and scripts in Designer involves following a general process each time you attach a calculation or script to an object. Although not all aspects of the process are required each time you create a calculation or script, following the process helps to eliminate potential errors and unexpected results.

In general, each time you create a calculation or script, you perform the following tasks:

  • Select the object to which you want to attach a calculation or script. Although you can create calculations and scripts that manipulate almost any object on your form design, not all form design objects support form events. For a list of standard objects included in the Object Library palette in Designer that support scripting, see Objects that support calculations and scripts .

  • Write your calculation or script in the script editing field of the Script Editor.

  • Test the calculation or script either by using the Preview PDF tab or in your test environment.

// Ethnio survey code removed