The Amount column must show the number of items ordered
multiplied by the unit price. You perform calculations in Designer
using FormCalc or JavaScript™. We will use
FormCalc for this calculation. FormCalc is a simple yet powerful
calculation language modeled on common spreadsheet software. Its
purpose is to facilitate fast and efficient form design without
requiring a knowledge of traditional scripting techniques or languages.
You use the Script Editor to enter calculations for the different
objects on the form.
If the Script Editor is not already showing, select Window
> Script Editor.
If you want, drag the Script Editor palette bar until the
palette is larger.
Select the cell under Amount.
Select Calculate from the Show list.
Select FormCalc from the Language list and Client from the
Run At list.
In the Script Source field, type the following calculation:
quantity * unitPrice
Deselect the cell to add the script to your form.
To set this column as read-only, select the cell again, then
in the Object palette, click the Value tab and select Calculated
- Read Only from the Type list.
Click to continue: Adding rows to the purchase order table
|
|
|