This article explains how to trace the flow of an Interactive Adobe form by displaying the value of form variables via JavaScript or FormCalc.

For JavaScript, use this syntax to display the value of variables on the Interactive Adobe form:

xfa.host.messageBox(xfa.event.name);

For FormCalc, use this syntax. The ‘xfa.event.name’ parameter is explained in the example below.

xfa.host.messageBox(xfa.event.name)

Here is an example using FormCalc.

(1) Issue transaction SFP to select the form in Change mode. Go to the Design View tab.

We want to display the Carrier ID value at the end of the Airline Carrier event.

(2) Click the Airline Carrier drop down box on the form to go to the Airline Carrier event logic.

6-23-2014 3-10-38 PM.png

 

The Airline Carrier (CARRID) event logic is displayed.  The highlighted line shows the ‘xfa.event.name’ parameter within the messageBox. This statement will
display the CARRID value.  If you do not specify a variable name, ‘$’ defaults to CARRID, which is the variable we are binding to in the CARRID event. Otherwise, you have to replace the ‘$’ with the variable name explicitly in the messageBox parameter .

6-23-2014 3-24-15 PM.png

We are binding to CARRID.

6-23-2014 3-42-52 PM.png

(3) For a quick in stream test, click on the Preview PDF tab. Enter ‘DL’ as the Airline Carrier.

6-23-2014 4-38-23 PM.png

The messageBox statement is encountered and displays the value of CARRID which is ‘DL’.

6-23-2014 5-18-23 PM.png

When using this form interactively, it will also display the value of CARRID.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply