Previewing the A2J Guided Interview® is an essential function of authoring. It is important to “see” what the end-user will see before it is finally uploaded and published over the web. For instance, while authoring a Guided Interview, you may find, after previewing it, that you have added too much information in a single Question clearer for the reader.
Finally, by previewing, you can troubleshoot the Guided Interview. You can determine whether Questions are flowing properly and whether information is being properly collected through the use of the variables and conditions you have written into each Question.
This chapter will explain how to enter Preview Mode, conduct a simple preview, and use the Preview Mode toolbox to troubleshoot the Guided Interview.
Entering Preview Mode
You can reach the Preview Mode in two ways. First, you can select the “Preview” Tab from the navigation buttons on the left side of the screen. The Preview of the Guided Interview will begin with the starting question (Figure 159). You can also Preview by selecting the “Preview” button from within the Question Design Window when editing a particular Question. This route allows you to Preview the Guided Interview, beginning with the Question which you are currently editing (Figure 160). Both ways take you into the A2J Viewer and allow you to see a version of the Guided Interview like an end user would see it.
Figure 159: Preview Mode from the Introductory Question.
Figure 160: The Preview button in the Question Design Window.
Once in Preview Mode you will see the Guided Interview interface and a Preview Mode toolbox (Figure 161). To return to the Question Design Window for the current question, select “Edit This.” (Figure 161). To return to the Question Design Window for the question where you began your preview session, select the “Resume Edit” button (Figure 161).
Figure 161: Preview Mode with “Resume Edit” and “Edit This” circled.
Simple Preview for Formatting and Content
A simple preview of a Question allows you the opportunity to test a number of formatting concerns. Here is a list of items that can be checked while conducting a simple preview of a question:
-
BUTTONS: Does the button work properly? Does the question connect to the intended question? Even if the button works properly, does the flow make sense to the end-user? Is it logical?
-
REQUIRED FIELDS: Are all of the required fields programmed as “user must fill in”?
-
FORMATTING: Is the formatting of the text in the question, pop-ups, and question help clear? Is it too verbose?
-
HYPERLINKS: If there are hyperlinks, do they work? Should more words be included in the hyperlinked phrase to ensure the end-user will not have trouble selecting the link?
Previewing to Troubleshoot
Preview Mode includes two ways to open the Variables and Script Testing Window. Both of these items are crucial to troubleshooting a Guided Interview (Figure 162).
Figure 162: Preview Mode with the two ways to open the Variables and Scrip Testing Window circled in red.
Variables/Script Testing Window
The Variables/Script Testing Window contains two components: the list of variables and the scripting sitting behind the Guided Interview as it runs in the A2J Viewer (Figure 163).
Figure 163: The Variables List and Scripting Box in the Testing Window.
The list of variables is at the top of the Testing Window. It contains the names of each variable and its value as it is collected during the preview of the Guided Interview. In the event you test a repeat dialog, the window will show, under the “Loop” heading, how many times you have repeated a loop. For instance, if you repeated a loop three times to collect names of children, the list would show the variable “Child first name TE” three times in the Variables list, with a #1, #2, and #3 listed in the adjacent Loop column, respectively (Figure 164).
Figure 164: The Variables List within Testing Window during a repeat loop.
Testing and retesting is made easier by the open, save, refresh, and clear buttons and the filter box, all located at the top of the Variables List in the Testing Window (Figure 165).
Figure 165: Variable List buttons within the Testing Window
Using the “Clear” button with the trash can icon, you can retest a question with new data. If you do not have time to finish testing a Guided Interview, the collected variable values can be saved, by selecting the “Save” button (Figure 165). To resume testing, enter Preview Mode using the Question Design Window for the last Question tested. Once in Preview Mode you can open a previously saved answer file by using the “Open” button (Figure 165). The saved answer file, in .anx file format, can also be used for testing with a HotDocs template. To learn more about testing your A2J Guided Interview and HotDocs template together, see Chapter 12. The “Refresh” button refreshes the variable list with current values. The Filter box allows you to sort your variable list. As you start to type into the box next to “Filter”, A2J Author will automatically filter your variable list by the characters that you have typed in (Figure 166).
Figure 166: Example of filtering by “Cli” to search for all variables referring to the “Client”
The Variables List in the Testing Window is very helpful in troubleshooting because it tells you immediately if you have failed to assign a variable to a field. If no value is reflected in the Variables List in the Testing Window after completing the question being tested, then you know you have to check the Question for a variable.
The second component in the Testing Window is the Script. It allows you to inspect how A2J Author® is treating each action associated with a question (Figure 167).
Figure 167: The Scripting Window.
The Script window will first show you the name of the question you are evaluating. In Figure 167, the first question listed in line 7 is “2 – Using macro in question text.” The window will then identify which button was selected as you moved through the question. In Figure 167, the button selected was “Yes.” The window will then reveal the variables for which the question was seeking values and the value of the variables collected upon clicking the button. In Figure 167, the variable [Married TF] collected the value “True.”
Similar to the Variables List you will find a “clear” button located at the bottom of the Interview Script window, represented by a trash can icon and the word “Clear.” Using the “clear” button removes the actions you have already tested from the scripting window so that you can easily test and retest a question with new data.
The Script window will also show the evaluation of every advanced condition contained within that question. More specifically, a condition is shown in green if the condition evaluates as true. When a condition evaluates as true, the Script window will also show how A2J Author® handled the actions conditioned on the advanced condition script.
If the conditioned action is to set the value of another variable, the window will show that is has “SET” a variables value according to the advanced condition scripting. As multiple values for multiple variables can be set off of one condition, it is possible to see a number of “SET” statements following a true (green) condition statement. If the conditioned action is to alter the destination question at that point in the interview, the window will show that the interview will “GOTO” the question designated in the advanced condition scripting. In other words, this window lets you know what A2J Author® is “thinking.”
In Figure 168 below, you can see several conditions. On line 4, A2J Author is converting the client’s birthdate from a date to years, then evaluating whether that number is less than 18. In this example, it is not less than 18, so the end user is moved on to the next question. On line 9, A2J Author is evaluating whether the user’s income is greater than 35,000. Because it is less than 35,000, A2J Author was told to “SET” the variable [Income too high TF] to “false.” On line 12, A2J Author is evaluating whether the user’s income is between 35,000 and 25,000. Because that condition is true (as seen by the green highlighting and the check next to it), the command is to “GOTO” question 1b-Income. On line 18, A2J Author is evaluating whether the number of people in the user’s household is 1 (it is more than 1 in this example). Finally, on line 21, there is logic that is set to test before the question is displayed to the end user. It is testing whether the user has said they were male or female. If the user is male, the question (which asks whether the user is pregnant) will not display. Because the condition is false here (the user said they were female), the question is asked to the end user.
Figure 168: Script example of A2J Author evaluating advanced conditions.
Script Decoder
In the chart below you will find a description of each type of colored text in the Interview Script window and what it represents. In addition, the chart provides a definition of the action commands “SET” and “GOTO.”
Interview Script Decoder |
|
Black text |
The name of the question being evaluated. |
Purple text |
Represents what button was selected. The statement is prefaced by the words “You pressed.” |
Tan text |
Variables for which the question is collecting values in any type of field, text, number, radio buttons, checkboxes, etc. If it appears underneath a green advanced condition statement, then the variable is being set as a result of the condition. |
Green text |
Advanced condition evaluation. If the advanced condition is in green, it represents that the condition is true. Any actions set as a result of the condition, either to “SET” a variable or to “GOTO” another question, will be reflected below the condition and indented. |
Red text |
Advanced condition evaluation. If the advanced condition is in red, it represents that the condition is false. |
“SET” |
The word “SET” shows what variable is being set with a predetermined value as a result of a condition being true. |
“GOTO” |
The word “GOTO” shows what destination question the current question is being directed to as a result of a condition being true. |