Working with the Expression list
Observe as the instructor examines more variable values as they change and as functions pass values.
- In the “other” Control Panel, under the Code tab, open the script for the function getDataForChart.

- Below the function declaration line, open a new line and type the debug(1) instruction, as shown here:
- Close the Code Editor window, and save the function.
- Return to the RevenuePieChart Component window.
- Click the Working Preview tab.
The Debugger window for the function passThisCustomerIDin appears. Notice that e.submitted appears in the Expression list, as when you last used the Debugger.
- Click the
button once to execute the call to the function getDataForChart.

The window for that function appears:
- Double-click on args.

The Debugger adds it to the Expression list below the script, and displays a message under Value:
The Debugger identified args as a potential variable name, and indicates that it has not been declared yet.

- Click the button.
![]()
The variable initialization executes, and the current value of args appears:
The +indicates that there may be more we can see about the parameter.
- Click the +.

The variable values list expands:
This makes the values easier to read and identify.
- Click the
button again.
The args.Set method executes, and new values for args appear in the list.
- Add the sqlStmts variable to the list.
- Click the
button.
Xbasic initializes the array element to 0.
- Add the arrayCount variable to the list.
- Click the
button.
Xbasic initializes the arrayCount variable to 0.
- Click the
button until the arrow is at the line after the statement dim chartDataTemplate as C. - Move the mouse pointer over the variable name useThisCustomerID both places it appears in the function. Do not pin either box to the window.
Both times, the Debugger displays a box with the variables current value, passed in from the Component’s other Xbasic function.
- Double-click on the second appearance of the useThisCustomerID. (You could have used either one.)
![]()
The Debugger places the variable’s name and current value in the first row of the grid below the script window, as shown here:
![]()
- Double-click on the variable name chartDataTemplate, either in the current statement or in the dim statement. The variable name now appears in the Expression list:
The variable has no value yet.
![]()
- Click the
button once to assign the string to chartDataTemplate. The variable’s new value appears:
Watch the same variables in your functions, and in addition:
- Locate the variable chartData and add it to the Expression list.
- Locate the variable sendThisToChart and add it to the Expression list, so you can see the JavaScript that Xbasic will send to browser.
- Step through the script.
- After executing the line arrayCount = sqlStmts.size(), notice the Value of arrayCount in the Expression list.