Returns the absolute value of a numeric value or expression. None Locates the starting character position of a string within another string. None Returns the whole number greater than or equal to a given number. None Returns the concatenation of two or more strings.
|Published (Last):||14 February 2005|
|PDF File Size:||18.65 Mb|
|ePub File Size:||15.25 Mb|
|Price:||Free* [*Free Regsitration Required]|
Designer also includes another language called FormCalc, which is covered in this chapter. Use of an object model: Like Web programming, Designer also has an object model that you can use for your scripting.
However, the execution details of scripting in Designer are unique and are reviewed in this chapter. The Benefits of Scripting In many cases, scripting improves the functionality and usability of your forms. A number of useful scripts are included in this form.
This script creates a new line item in the purchase order each time the button is clicked. Figure 4. Another practical script is found in the Grand Total text field numGrandTotal. This script automatically calculates the grand total for the purchase order every time a financial event on the purchase order occurs.
When a new item is entered or when a new tax is applied, the grand total is automatically recalculated. This is a very useful script for form fillers because they can see how all of their changes and additions to the purchase order affect the bottom line.
As described in the purchase order example, the addition of automatic calculations makes your forms much more useful to your form fillers. Ability to control the appearance of form objects at runtime. In the previous chapter, you set the visual properties of your form objects at design time.
With scripting, you can make changes to the visual properties of your form at runtime to provide assistance to your form fillers. For instance, before your users submit a form, you can use a validation script to check to make sure that all of the required fields have been filled in with data. If there are required fields without data, you can call a script to highlight them in yellow. Enforcement of business rules.
You can use form scripting to enforce the business rules of your company or industry. For instance, the purchase order example could have a script that takes an action whenever the grand total goes above a certain threshold. Data validation and formatting. In addition to using patterns and properties to enforce data validation, you can use custom scripting. This is very valuable because you will be able to correct many data entry mistakes before they get to your back-end system.
Objects that Support Calculations and Scripts You can create calculations and scripts that impact all form design objects. However, you can only add calculations and scripts to the form events of a particular object. The following table provides a quick reference of scripting support for objects available in the Standard category of the Library palette.
Where to find documentation, samples, and tutorials