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. None CTerm n1, n2, n3 Returns the number of periods needed for an investment earning a fixed, but compounded, interest rate to grow to a future value. None Returns the current system date as the number of days since the epoch.
|Published (Last):||2 May 2015|
|PDF File Size:||18.98 Mb|
|ePub File Size:||9.46 Mb|
|Price:||Free* [*Free Regsitration Required]|
A good programmer is someone who always looks both ways before crossing a one-way street. You can achieve a great deal of functionality and customization without scripting.
You have already learned a lot about these property settings in previous chapters, and you will learn more in Chapter 5, "Form Data.
If you are familiar with scripting on the Web or another platform, you will find the scripting concepts in Designer to be very familiar. 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.
How to Create Scripts for Online Forms with Adobe LiveCycle Designer