
To find scripting errors for your FormCalc scripting, run the Adobe LiveCycle Designer preview. You can see the results on the Warnings tab page in the Report palette. Depending on the version of Adobe LiveCycle Designer, every time you run the preview, the new results will either replace the previous result or be appended to the old list. In the latter case, for a better overview, clear this list every now and then by choosing Clear Warnings from the palette menu.
If your scripting for one event contains more than one command, the system ignores any commands that follows a syntax error for that event. The system executes any correct commands that precede this error.
For a more permanent control of errors, you could also use the trace functionality. Trace level 1 (Short Trace) is sufficient for tracking scripting errors. If you choose the Very detailed level, the trace also contains detailed rendering information from Adobe Document Services, and the trace is attached to the resulting PDF. The trace settings are user-specific and valid for one session. If there are several print requests, the system overwrites the corresponding files, unless different names are specified. This is not valid if several forms are issued in one print job, in which case the runtime data is numbered sequentially.
For the trace functionality, the user must have authorization for debugging. If you want to create a trace during background processing, choose the Very detailed level to have the trace information attached to the spool document (the download functionality is not available during background processing).
Scripting: Performance Aspects
Avoid scripting as it slows down performance, and use the following options instead:
- ABAP coding in the program or the initialization node of the interface.
- Static object properties instead of dynamic properties.
- Dynamic properties instead of scripting, if possible.
- Simple (relative) names instead of long names.
- Subforms for hiding elements without scripting.
Since scripting tends to slow down performance, try to avoid it, if possible. For example, do not calculate the sums of an items list within the form; instead, calculate this in the ABAP program. Define the interface in such a way that the internal table with the items is passed to the form along with a parameter that contains the sums.
If a field has no value and you want to hide some form elements, proceed as follows:
- To wrap the elements in a subform, select them in the hierarchy and choose Wrap in Subform from the context menu.
- Set the subform’s data binding to UI element on the layout, that does or does not have a value.
- On the Binding tab page, in the Object palette, select the Repeat Subform for Each Data Item option, but deselect the Min Count and Max checkboxes.