This chapter provides an overview of scripting actions and discusses how to:
Use the Type To command.
Script the Type To command.
Use the Select Grid Row command.
Script the Select Grid Row command.
Use the Press Toolbar Button command.
Script the Press Toolbar Button command.
Use the Press Push Button command.
Script the Press Push Button command.
Use the Select ComboBox Item command.
Script the Select ComboBox Item command.
Use the Build Tree Path command.
Script the Build Tree Path command.
Use the Database Validation command.
Script the Database Validation command.
Associate a validation.
Execute a validation.
Use the command line.
Script a Command Line command.
Action commands within Oracle's JD Edwards EnterpriseOne Autopilot designate actions that a script carries out–for example, when users click buttons, select options, and enter data–within a context such as an application or form. Action commands require a context. They are essential because they specify the unique steps that the system takes within the context. For example, you must write action commands to create a transition between forms; to enter data in header controls, grid columns, or Query By Example (QBE) lines; to select lines in a grid; to perform database queries and updates; and so on.
Action commands also enable you to use a script to access a non-JD Edwards EnterpriseOne application, such as Microsoft Excel. You do this by sending a message to the system from a command line in JD Edwards Autopilot. You can also use the Command Line command to capture screens and store the images in a file for later use.
In addition, you can use action commands to enhance existing scripts. For example, you can write an action command to include a previously-created script within another script. For instance, in a script that requires entry of dates and then tests functions, you might include a standalone script that tests the date entry.
When you play back a created script, you can use action commands to configure the playback. For example, you can insert a Wait command in the script. This command instructs JD Edwards Autopilot to wait the specified length of time at a particular point in the script before it proceeds with playback. In addition, you can insert comments in the script to document the goal of the testing or to describe what occurs at a particular point during playback.
After you script the entry of form data, you can verify that JD Edwards Autopilot has entered the information in the specified database. The Database Validation command enables you to do that.
Action commands enable you to:
Build scripts that test a particular set of processes.
Test whether data is properly entered in the database.
Modify and add comments to existing scripts.
Configure the way that scripts run.
Use applications external to JD Edwards EnterpriseOne to run a script or perform other tasks.
This section provides an overview of the Type To command and discusses how to:
Use the Header Control and Grid Column lists.
Use the Source of Input list.
Use literal values.
Use a valid values list.
Use variables.
Describe variable scope.
Use global variables.
Use local variables.
Use the value selection list.
You use the Type To command to script inputs for header controls, grid columns, or QBE lines in a form. Unlike some action commands–such as the Press Toolbar Button command–there is no item on the Command menu or toolbar button that represents the Type To command. To write it, you use lists to specify the context as a header, grid, or QBE line; you specify a header control or grid column; you designate a source of input for the control or column; and you select a value to input into the control or column. The value can be a literal or you can derive it from a variable, a list of valid values, a user defined command (UDC) visual assist, or a form-interconnect visual assist.
The lists that you use to write the Type To command appear in the command pane of the JD Edwards Autopilot window.
The Header Control and Grid Column lists are populated with alphabetic descriptions of the data dictionary items that are located in the header, grid, and QBE areas of the form, which is the context you have set. You click a control or column in which to script an input.
After you select a header control or grid column, use the Source of Input list to select one of these sources from which to retrieve a value to input into the header control or grid column:
Literal value
Valid values list
Variable
UDC visual assist value
Form interconnect visual assist
Clear source of input
When you select the Literal Value option as a source of input, you specify that an entry in a control, grid column, or QBE line of a form appears exactly as it appears in the value selection list. For example, the literal value of a NameAlpha control entry might be Jane Meade, which is the exact text that JD Edwards Autopilot enters in the header control of a form when the script runs.
When you select a literal value as a source of input, JD Edwards Autopilot assigns only one value to a header control, grid column, or QBE line in a form. If you select a list of valid values as a source of input, you can create a text or numeric file that contains multiple values, any of which you can enter in the header control, grid column, or QBE line. You can create a valid values list either by assigning your own values or by selecting a database and querying it for values to include in the list.
You can use a list of valid values as an input source to run a script multiple times and, each time, enter a different value in a specified header control, grid column, or QBE line. As JD Edwards Autopilot loops through the script, the value that it enters in the control or column changes to reflect the values in the list. Alternatively, you might run the script once but enter five different values in a grid column. You can do this by creating a single list of valid values that contains five items.
If you exit a script and exit JD Edwards Autopilot, and then you open the script again, JD Edwards Autopilot resets the list of valid values. That way, when you play back the script, the first value that you entered in the list appears first. If you exit a script without exiting JD Edwards Autopilot and then open the script again, JD Edwards Autopilot uses the value that is next in order on the list when you exit the script.
You can select a value, store it, and then use it at a subsequent place in the script. You can also use the value more than once in the script. In this case, use a variable as a source of input and store its value anywhere in the script. You declare the variable to assign a name to it. Then you set and store its value, which you can retrieve from a list of valid values, header control, grid column, another variable, or from the literal input.
The Command pane of the JD Edwards Autopilot window displays these components when you write a variable command:
New Variable list.
You enter the name of the variable in this list, thereby declaring the variable.
External Variable option.
By selecting this option, you specify that the variable can be linked to a variable in another script so that its value can be passed between scripts.
Default Variable list.
You can enter a value that JD Edwards Autopilot uses even if you do not set a value for the variable.
Existing Variable list.
JD Edwards Autopilot displays the names of any existing variables that you have declared in the script.
Source of Value list.
You select a source of value for the variable, such as a literal value, a list of valid values, a header control, a grid cell, or another variable. In addition, you can select variable manipulations, such as adding or subtracting a literal value or a variable value from the variable.
Value Selection list.
You enter a literal value or select the object that contains the value that you store in the variable. For example, if you select a header control as the source of value, you use the value selection list to select the specific control that contains the value. You can also obtain variable values from lists of valid values, from variables to which you have previously assigned a value, or from JD Edwards EnterpriseOne sources, such as error and warning messages or grid row counts.
This table explains other key terms that are related to variables in JD Edwards Autopilot scripts:
Term |
Description |
Variable scope |
The range of commands within a script in which the value for a variable can be used. |
Global variable |
A variable for which the value can be used throughout an entire script. |
Local variable |
A variable for which the value can be used only within a portion of a script. |
External variable |
A variable that can be linked to a variable in another script so that a variable value can be passed between scripts. |
Default value |
A value that you assign to a variable that JD Edwards Autopilot uses when you do not set the value of the variable elsewhere in the script. |
Conditional statement |
An If /Then statement that you write by comparing the values of two variables. The statement stipulates that if a condition exists in the script, then the script should run other commands. |
Variable concatenation |
The practice of stringing together two or more variables to create a new variable. |
System variable |
A variable for which the value is derived from JD Edwards EnterpriseOne data, such as error and warning messages. |
Valid values count |
A variable for which the value is derived from the number of items in a list of valid values. |
Variable watch list |
A list that tracks variable values that are used during script playback. |
Validation success |
A variable for which the value indicates the success or failure of a database validation. |
The term variable scope refers to how broadly you can use the value of the variable within a script. You create a node each time that you write a context command. The node in which you declare a variable determines its scope. For example, if you declare a variable within an Application command node, the scope of the variable extends to that node only, and you can use a value that you set for the variable only within that node. If, for example, you declare a variable within an Application command node and then you launch another application, you cannot use the value that you set for this variable within the new Application command node. If you declare a variable within a Form command node, its scope extends only to that form.
The scope of a variable is global when you can use its value throughout the entire script. To establish global scope for a variable, you must make the Declare variable command a child of the Begin Script node, which is always the first node in the script.
You can use the value of a local variable only within a portion of the script, specifically the node to which you attach it. For example, you might declare the variable immediately after you launch an application and a form. In this instance, you can set the value of the variable and use this value only for any command lines that you script within the Form command node because the Declare variable command that you write is a child of the Form command node.
You can expand the scope of the variable by dragging it to another node that is higher in the script. For example, you might drag the Declare Variable command from the Form command node to the Application command node, which makes it a child of the Application command. This action broadens the scope of the variable, and you can use the value that you set for it anywhere within the application.
However, the scope of the variable remains local. If you launch another application later in the script, you cannot use the value of the variable within that new Application command unless you make this command a child of the first Application command.
External Variables
A variable with global scope enables you to pass a value to header controls, grid columns, and QBE lines throughout a single, standalone script. JD Edwards Autopilot also enables you to declare a variable as external, which means that you want to link the variable to a variable in another script. You use external variables when you want to pass variable values between scripts. For example, you might store a batch number in one script. If you declare the variable that stores the batch number as external, you can link that variable to external variables in one or more other scripts, and pass the batch number value to other scripts.
Default Values for Variables
You can create a script that you can use both in standalone mode and with other scripts. To do so, you assign a default value to the variable. For example, you might create script B that links to script A, which passes along a batch number value. Suppose, however, that you want to use script B by itself. If you set a default value in script B, JD Edwards Autopilot uses that value when you use script B in standalone mode.
You can also assign a default value to a variable that you do not declare as external. JD Edwards Autopilot uses the default value of the variable each time that you use it as a source of input for a header control, grid column, or QBE line. If you write a command to set a value for the variable, that value overrides the default value.
Conditional Statements
Conditional statements enable you to write If/Then/Else commands that compare the values of two variables for which you have declared names and set values. If the script meets the conditions that appear in the statement, then JD Edwards Autopilot runs an additional branch of the script. Conversely, you can write commands that are connected to an Else branch in the script, or you can enable the script to end if it does not meet the condition that appears in the statement.
You can write a conditional statement to ensure that a script tests an application even if the script does not meet the conditions that you expect to exist. For example, suppose that you test making revisions to an existing Address Book number. If the Address Book number exists, then JD Edwards Autopilot selects the grid line in the Work With Addresses form, double-clicks the line, and then revises the existing Address Book number in the Address Book Revision form. However, if the Address Book number does not exist, the script fails unless you write a conditional statement stipulating that if the Address Book number does not exist, JD Edwards Autopilot adds a form and runs commands to create a new Address Book entry.
A different conditional statement might test the converse. If the Address Book number does not equal the number that JD Edwards Autopilot returns to the QBE line of the Work With Addresses form, the Address Book number does not exist. If that condition is met, JD Edwards Autopilot clicks Add and creates a new entry. If the Address Book number does exist, JD Edwards Autopilot double-clicks the grid line and revises the Address Book entry. This is the Else portion of the statement.
You can also compare variables between scripts by declaring a variable as external in one script, including the script with a parent script, and linking the external variable to a variable in the master script. You then build the conditional statement on these two variables.
You can use JD Edwards Autopilot to set conditional statements of data equality or inequality, but the tool does not enable you to develop compound conditional statements that link together.
Variable Addition
Variable addition enables you to change the value of a variable. One way that you can use this option is to scroll through a grid from top to bottom. For example, you can write a command that adds 1 to the row number of the grid each time JD Edwards Autopilot plays back the node of the script. If you set the repeat count of the node to match the number of lines in the grid, JD Edwards Autopilot scrolls through the entire grid, one line at a time, from top to bottom.
Variable Subtraction
Variable addition enables you to change the value of a variable. One way that you can use this option is to scroll through a grid. Variable subtraction enables you to scroll through the entire grid, one line at a time, from bottom to top. You write a command that subtracts 1 from the row number of the grid each time JD Edwards Autopilot plays back the node of the script.
Variable Concatenation
Variable concatenation changes the value of an existing variable by concatenating some value to its current value. For example, if a variable has the value of 10, you could change it to 1025 by concatenating the value of 25 to the original value of 10.
System Variables
System variables obtain their values from JD Edwards EnterpriseOne, rather than from the information that you enter in JD Edwards Autopilot. To use a system variable, you do not need to declare a variable or set its value because its value is determined during script playback.
This table names the system variables and presents examples of how they might be used in script writing:
System Variable |
Description |
Possible Uses |
::ERRORS |
JD Edwards Autopilot records the number of JD Edwards EnterpriseOne error messages that occur during script playback. |
Use in conjunction with a conditional statement. For example, set a condition specifying that if the number of error messages returned is greater than 0, then JD Edwards Autopilot should run the Exit JD Edwards command. |
::WARNINGS |
JD Edwards Autopilot records the number of JD Edwards EnterpriseOne warning messages that occur during script playback. |
Use in conjunction with a conditional statement. For example, set a condition that specifies that if JD Edwards EnterpriseOne sends a warning message when the OK button is clicked, then JD Edwards Autopilot should click the OK button twice. |
::FORMGRIDROWCOUNT |
JD Edwards Autopilot records the number of completed rows in a grid. |
Set a repeat count for a node to ensure that JD Edwards Autopilot accesses each line in the grid during script playback. |
Note. The value of the Grid Row Count system variable is the number of rows currently loaded in the JD Edwards EnterpriseOne grid, not by the total number of rows in a completed grid. If you want the Grid Row Count value to reflect the actual number of rows in the grid, use the Select Grid Row command to go to the bottom of the grid. After you script this command, the Grid Row Count value is the total number of completed rows in the grid.
Valid Values Count
If you select the Valid Values Count option as an input source, you also select a created valid value from the value selection list. The list can be stored either on your local drive or on a server. JD Edwards Autopilot counts the number of items in the list and stores that number as a variable. You can use the valid values count as a source of input and establish the repeat count for a node by setting the value of the grid row count from the valid values count. The number of times that JD Edwards Autopilot repeats the script node matches the number of items in the valid values list, and you can write a command for JD Edwards Autopilot to enter the values from the valid values list to a cell in each line of the grid.
Variable Watch List
The Watch list, which you can select from the JD Edwards Autopilot View menu, is a separate window that displays the values of variables in the script during playback. Because the Watch list window is independent of other JD Edwards Autopilot windows, you can display it at all times, even as you exit and open scripts.
The Watch list contains two column headers: Variable and Value. During script playback, each time that JD Edwards Autopilot sets the value of a variable, it adds the variable name and its value to the list. If the variable value that JD Edwards Autopilot enters in a header control or grid column is invalid and script playback stops, JD Edwards Autopilot stops adding values to the Watch list. Each time that you stop the script and replay it, JD Edwards Autopilot clears the Watch list.
Validation Success
The Validation Success variable enables you to quickly verify the existence of data that you expect as a result of running a script. After you declare a validation, you select Validation Success as an input source, and use the value selection list to select the name of the validation to verify.
After you associate and run the validation and run the script, JD Edwards Autopilot uses the Watch list to display the name and value of the validation success variable that you created. A value of 1 indicates that the validation was successful, and a value of 0 indicates that the validation failed. In the rare instance that you declare and associate a validation but do not run the validation, JD Edwards Autopilot returns a value of 2 when playback ends.
UDC Visual Assist Value
You can also use a value from a UDC visual assist as an input source. Selecting the UDC Visual Assist Value option from the Source of Input list populates the UDC Visual Assist Value list with the same UDC values that appear when you click the Visual Assist button on the form. During playback, JD Edwards Autopilot expands and interprets this command by opening the Visual Assist form and selecting the specified value.
The UDC Visual Assist Value option appears in the Source of Input list only if a header control or grid column in the form contains a visual assist.
Form Interconnect Visual Assist
You might need to use a visual assist that is not associated with a UDC. For example, suppose that you run a company master search. In JD Edwards EnterpriseOne, when you click the Visual Assist button for company master search, a new application appears.
You create this form interconnect in the JD Edwards Autopilot script by selecting the Form Interconnect Visual Assist option in the Source of Input list. When you insert a Form Interconnect Visual Assist command into a script, JD Edwards Autopilot automatically inserts additional commands to perform the Application Interconnect and Confirm Form commands needed to access that visual assist. However, you must script the additional commands that are needed to select a value from the visual assist on the form.
The Form Interconnect Visual Assist option appears in the Source of Input list only when a header control or grid column contains a visual assist that requires an exit to a new application.
Note. You do not use the value selection list when you select the Form Interconnect Visual Assist option. This source of input requires that you select a value after you exit to the new application.
Clear Source of Input
The Clear command in the Source of Input list enables you to remove an entry to a header control, grid column, or processing option form control. Each time that you select a control or grid column from the command pane and select the Literal Value option from the Source of Input list, JD Edwards Autopilot provides a reminder in the value selection list that you can clear the content of the control or column.
See Also
Changing the Scope of a Variable
After selecting a source of input, you must specify the value or values to enter in the header control, grid column, or QBE line. You can use any of these methods to supply the value:
Enter a literal value of numbers, letters, spaces, or a combination of these.
Select a valid values list that you created.
Select a variable that you declared and set.
Select a system variable.
Select a UDC or form-interconnect visual assist value.
Remember, the caption of the value selection list changes to reflect the option that you select in the Source of Input list.
This section provides an overview of scripting the Type To command and discusses how to:
Use the Header Control or Grid Column list.
Use a literal value as a source of input.
Create a list of literal values.
Create a valid values list from a simple database query.
Use valid values as a source of input.
Update the repeat count in a node.
Use a variable as a source of input.
Declare a variable.
Change the scope of a variable.
Set the value of a variable.
Use the value of a variable as a source of input.
Update the value of an existing variable.
Set conditional statements.
Add a value to a variable.
Subtract a value from a variable.
Concatenate a variable.
Create a variable to confirm validation success.
Create a variable to store a valid values list count.
Use a UDC visual assist value as a source of input.
Use a form interconnect visual assist as a source of input.
Clear an input from a header control or grid column.
Use the value selection list.
Assign a literal value.
Assign a valid values list value.
Assign a variable value.
Assign a form interconnect visual assist value.
Script the Type To command.
Type data in a header control.
Select options in a header.
Type data in a grid cell.
Assign a UDC visual assist value.
Type data in a QBE line.
You use the Header Control, Grid Column, Source of Input, and Value Selection lists to create a Type To command. You create this action command when you create the context commands Header, Grid (or Detail Information), and QBE. When you click the Insert button, JD Edwards Autopilot writes the context command and the Type To command and indents the Type To command beneath the context command to reflect the Script pane command hierarchy.
You begin writing the Type To command when you select Set Header Control Value, Set Grid Cell Value, or Set QBE Cell Value in the Command menu. When you select one of these commands, the Header Control or Grid Column list appears, populated by the controls or columns from the active form. You click the control or column in which you type data.
To use a Header Control or Grid Column list:
On the Command menu, select Set Header Control Value, Set Grid Cell Value, or Set QBE Cell Value.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
In the Header Control or Grid Column list of the command pane, select a header control or grid column in which to enter data.
Click the Insert button.
Using the Source of Input List
After you select a header control or grid column, you must select a source of input for it. Depending on the process that you are testing and the way that you want the script to run, you select from any of four possible sources of input: Literal Value, Valid Values List, Variable, or UDC Visual Assist Value.
After you select a source of input, you select a value from the value selection list, which is documented separately.
When you run a script, a literal value appears in the form exactly as you type it in the unpopulated Literal Value field.
To use a literal value as a source of input:
In the command pane of the JD Edwards Autopilot window, select the Literal option from the Source of Input list.
In the Literal Value field, type an input as you would enter it in the header control, grid column, or QBE line of the form.
The entry can be letters, numerals, special characters, spaces, or a combination of these.
Click the Insert button.
Using Valid Values List as a Source of Input
After you create a valid values list, you can use it as a source of input for a header control, grid column, or QBE line. You use a valid values list to enter values multiple times or to run a script multiple times and input a different value each time.
For example, if a valid values list contains five items, you can enter 5 for the repeat count for the node that contains the list. During one script playback, JD Edwards Autopilot loops through the node five times and inserts a different item from the list each time. Conversely, you can enter 1 in the repeat count for the node that contains the list but change the repeat count at Begin Script to 5. During each of the five playbacks of the entire script, JD Edwards Autopilot inputs a different value from the list.
If you close the script, leave JD Edwards Autopilot open, and then open and rerun the script, JD Edwards Autopilot inputs the next value in the list in the appropriate context. After you create the valid values list, it contains stored values that you can use as a source of values in any script.
You must create a valid values list before you select it as a source of input for a form. To create a valid values list, select the Generate Valid Values List command from the Tools menu, enter values in the list, then name it and save it.
A list of literal values is a list that contains values that you select. Before you create the list, you should verify that the values that you create are valid for the application that you want to test.
To create a list of literal values:
On the menu bar of JD Edwards Autopilot, click Tools.
Select Generate Valid Values List.
On the Select Data File Type form, select List of Literal Values and click Next.
On the Enter File Name & Date form, type a file name in the File Name field.
If you type the name of an existing file, the values in it automatically populate the list.
Type one valid, literal value per line, pressing Enter after each value.
Click Finish.
A simple database query produces a valid values list that contains values that JD Edwards Autopilot retrieves from the database and includes in the list, based on the table and column that you select. You can limit the number of records in the list, and you can specify the method that JD Edwards Autopilot uses to sort the records, such as in ascending, descending, or random order.
To create a valid values list from a simple database query:
On the Tools menu, select Generate Valid Values List.
On the Select Data File Type form, select Simple Database Query and click Next.
On the Select Table form, double-click a table.
On the Column Name form, select a table column and click Next.
Specify format options and sort options by clicking the appropriate options.
Note. To view the contents of the valid values list, click the Preview button.
Click Preview.
Click Next.
On the Finish form, assign a file name to the valid values list by typing in the control.
Click Finish.
After you create a valid values list, you return to the Command menu and click the context for writing commands. You select a header control or grid column, and then select the Valid Values List option from the Source of Input list. When you select the Valid Values List option, the name of the list that you created appears in the value selection list.
To use a valid values list as a source of input:
On the Header Control or Grid Column list in the command pane of the JD Edwards Autopilot window, select a header control or grid column.
Select the Valid Values List option in the Source of Input list.
Select the name of a valid values list that you have created.
Click the Insert button.
To use all the values in a valid values list as inputs for a header control, grid column, or QBE line, change the repeat count in the Form command node of the script to match the number of items in the list. This ensures that JD Edwards Autopilot successively types each value in the control, grid column, or QBE line during playback until it exhausts the list.
To update the repeat count in a node:
In the Script pane of the JD Edwards Autopilot window, click the Form line for the node in which you scripted the list of valid values.
In the Repeat Count list in the command pane, type the number of times that you want the node to run.
Click the Update button.
To use a variable as a source of input, you must first declare it (that is, give it a name). You can declare the variable at any point in the script. However, if you make the variable global, the value that you assign to it can be used at any subsequent point in the script. After you declare the variable, you can set it (assign a value to it) and store the value for later use in the script in the variable. After you have set the value of the variable, you can change it at any point in the script. If you declare and set the value of more than one variable, you can write conditional statements to compare their values. For example, you might use a conditional statement to verify that a value exists in the database. If the conditional statement shows that the value does not exist, you can modify the script with commands to add the value.
When you declare a variable, you name it to indicate the place where a value that you set can be stored. You can insert the Declare variable command at any point in the script. Where you declare the variable determines its scope. However, you can change the scope of a variable by dragging it from one point in the script to another.
To declare a variable:
On the Command menu, select Variables.
Note. You can perform this step at any point in the script.
In the command pane, type a name for the variable in the New Variable field.
Select an initial value for the variable, if desired.
Click the Insert button.
The scope of a variable is the context within which you can use an assigned value. The scope of the variable can extend locally (to a form or a single application) or globally (throughout the entire script), regardless of how many applications you launch. If you make the variable global, you can select any point in the script to set its value, and you can use the value at any point in the script.
You can declare the variable at any point in the script. To change its scope, move it up or down in the hierarchy of Script pane commands by clicking the Declare command and dragging it to the point that you select.
As you move the mouse pointer, an arrow appears over the Declare command line. An upward-pointing arrow indicates that the command line that you are dragging will be placed above the line that is highlighted when you release the mouse button. A downward-pointing arrow indicates that the command line that you are dragging will be placed below the line that is highlighted when you release the mouse button.
To change the scope of a variable:
In the Script pane of the JD Edwards Autopilot window, click the Declare command line.
Drag the Declare command line to another context by pressing and holding the mouse button.
To make the variable global, drag the Declare command to the top of the script.
When the Declare command line is over the Application command line and the arrow is pointing up, release the mouse button.
After you have declared the variable, you set its value. You store the value in the declared variable so that you can use it at various points in the script that are determined by the scope of the variable.
To set the value of a variable:
On the Command menu, select Variables.
In the Existing Variable list of the command pane, select the name of the declared variable to which you want to assign a value.
In the Source of Value list, select one of these sources for the value:
Literal Value
Valid Values List
Variable
Header Control Data
Grid Cell Data
Depending on the source, perform one of these tasks:
If you assign a literal value, type that value into the Literal Value field in the command pane.
If you created a list of valid values or declared and set the value of another variable, click the name of one of the values in the list.
To derive the value from a header control or grid column, click the name of the control or column that populates the list.
Note. If you select Grid Cell Data as the source of value, JD Edwards Autopilot displays an unpopulated Row Number list and the grid columns for the form in which you are working. If you enter a grid row number in this list and click the Insert button, JD Edwards Autopilot stores the value from the row that you specified.
Click the Insert button.
JD Edwards Autopilot sets the value that you select and stores it in the declared variable.
After you have declared a variable and set its value, you can use the value as a source of input. The scope that you establish for the variable determines where you can use its value in the script.
To use a variable in the script:
In the Header Control or Grid Column list of the command pane, click a header control or grid column of a form to establish the context in which to input the value of the variable.
In the Source of Input list, select Variable.
In the Variable list, select the name of the declared variable for which you set a value when you began the scripting process.
Click the Insert button.
JD Edwards Autopilot enters the variable that you set in the header control, grid column, or QBE line.
Like any other JD Edwards Autopilot script command, you can change Set Value commands if it is necessary to do so.
To update the value of an existing variable:
In the Script pane of the JD Edwards Autopilot window, click the Set command line.
You assigned a value to the declared variable on this line.
In the Variable list of the command pane, select the name of the variable to update.
Select an option from the Source of Value list.
Select or enter a value.
Click the Update button.
To use JD Edwards Autopilot to compare the values of two variables, click If <var > == <var > in the Command menu. When you do so, the command pane displays three populated lists that enable you to write a conditional If/Then statement, which also includes an Else statement. JD Edwards Autopilot populates two of the lists with the names of the variables that you have declared. You write the left and right side of the conditional statement by selecting from each of these lists. To compare the left variable to a literal on the right (rather than a variable), enter a literal value in the Right Literal list.
The third list contains conditional operators such as equal to, not equal to, greater than, and so on. The command pane also includes a check box, for numeric comparison. When you select this option, JD Edwards Autopilot converts the text variables to numeric values before it compares them. To write a conditional statement that uses a string, rather than a numeric value, select the Is Not In option from the list of conditional operators.
Note. You are not required to write any commands as part of the Else branch of the script. You write commands that are part of the Else branch to have JD Edwards Autopilot run a series of commands only if the first part of the conditional statement is not true.
To set a conditional statement:
In the JD Edwards Autopilot window, declare and set the value of two variables.
Note. You can declare the variables and set their values at any point in the script before you write the conditional statement.
On the Command menu, select If <var > == <var >.
In the command pane, select options from these lists:
Left Variable
Operator
Right Variable
Right Literal
(Optional) If the values of the variables are numeric, select the Numeric check box.
Click the Insert button.
JD Edwards Autopilot enters the If portion of the conditional statement in the Script pane. The Then and Else portions are blank.
Write and insert in the script the commands that constitute the Then branch of the conditional statement.
Click the Insert button.
To add an Else condition, drag the insertion cursor beneath the Else command line in the Script pane.
Write and insert in the script the commands that constitute the Else branch of the conditional statement.
Click the Insert button.
You can include branches of script for which the execution depends on the conditional statement.
You can add to a variable the value of another variable or you can add a literal value. You can add a value to a variable regardless of whether you have merely declared the variable or both declared the variable and set its value. However, if you declare a variable and plan to set its value by adding a value later in the script, enter a default value so that JD Edwards Autopilot has an original value to supplement by the addition. To add the value of one variable to another variable, you must first declare and set the value of the variable that contains the value that you want to add.
To add a value to a variable:
On the Command menu, select Variables.
Select a variable from the Existing Variable list.
Select one of these options from the Source of Value list:
Add Variable
Add Literal
To add a variable value, select the name of a variable from the Variable list.
To add a literal value, enter a literal value in the Literal Value field.
Click the Insert button.
You can subtract from a variable either the value of another variable or a literal value. You can subtract a value regardless of whether you have set the value for the variable, provided that you set a default value when you declare the variable.
To subtract a value from a variable:
On the Command menu, select Variables.
Select a variable from the Existing Variable list.
Select one of these from the Source of Value list:
Subtract Variable
Subtract Literal
To subtract a variable value, select the name of a variable from the Variable list.
To subtract a literal value, enter a literal value in the Literal Value field.
Click the Insert button.
Concatenating a variable enables you to create alphanumeric strings from multiple variables. You can construct a concatenated variable from other variables or from literal values. This table illustrates the principle of variable concatenation:
Variable Name |
Variable Value |
X |
1 |
Y |
1 |
X concatenated with Y |
11 |
Note. Before concatenating a variable, declare at least one variable, and either set its value or enter a default value.
To concatenate a variable:
On the Command menu, select Variables.
Select a variable from the Existing Variable list.
Select one of these from the Source of Value list:
Concatenate Literal
Concatenate Variable
To concatenate a literal value, enter a literal value in the Literal Value field.
To concatenate a variable, select a variable from the Variable list.
Click the Insert button.
JD Edwards Autopilot creates a concatenated value for the variable selected from the Existing Variable list.
To confirm the success or failure of a validation, you declare a variable and select Validation Success as a source of value. When you select the Validation Success option, JD Edwards Autopilot displays the names of the declared validations in the value selection list. When you run the validation, JD Edwards Autopilot sets the value of the variable to 1 if the validation succeeds. If the validation fails, JD Edwards Autopilot sets the value of the variable to 0. If you declare the validation and assign values but do not run it, JD Edwards Autopilot sets the value of the validation variable to 2.
Select the Watch List option on the JD Edwards Autopilot View menu to determine whether the data validation is successful following playback. The Watch list displays the name of the validation variable in the Variable column. If the validation is successful, JD Edwards Autopilot displays 1 in the Value column.
Note. Before creating a variable to confirm validation success, declare and associate a validation. You must run the validation to have JD Edwards Autopilot indicate success or failure by returning a value of 1 or 0.
See Using the Database Validation Command.
On the Command menu, select Variables.
Enter the name of a variable in the New Variable list, or select the name of a variable from the Existing Variable list.
Select Validation Success (0/1) from the Source of Value list.
Select the name of a validation from the value selection list.
Click the Insert button.
If the validation runs successfully, JD Edwards Autopilot displays a value of 1 for the validation variable in the Watch list.
To capture and store the value that equals the number of items in a list of valid values, you select the Valid Values Count option as a value source for a new or existing variable. After you select this source of value, you select a valid values list. JD Edwards Autopilot stores the number of items in the list as the value for the variable.
To use the valid values count as a source of value, you must create a valid values list, either by generating a simple database query or by creating a list of literal values.
To create a variable to store a valid values list count:
On the Command menu, select Variables.
Enter the name of a variable in the New Variable list, or select the name of a variable from the Existing Variable list.
Select the Valid Values Count option from the Source of Value list.
Select the name of a valid values list from the value selection list.
Click the Insert button.
The Watch list displays the number of items in the valid values list as the value of the variable.
To use the valid values count to set the repeat count for a node, select the node in the Script pane that contains the valid values list used to determine the value of the Valid Values Count variable.
In the Define Repeat Count list, select Variable.
In the Repeat Count list, select the variable that stores the valid values count value.
Click the Update button.
JD Edwards Autopilot updates the repeat count value, which now matches the item number value in the valid values list. When you run the script, JD Edwards Autopilot enters a value from the valid values list in a grid cell, one grid row at a time, until it has used each value in the valid values list.
Some header controls, grid columns, and QBE lines in forms contain UDC visual assists. When you select the UDC Visual Assist Value option as a source of input, the UDCs in the value selection list in the command pane correspond to the codes in the visual assist forms.
The flashlight button identifies the UDC visual assist, but JD Edwards EnterpriseOne software also identifies other visual assists in this way. The UDC Visual Assist Value options appears in the Source of Input list only if a header control or grid column in the active form has a UDC visual assist.
To use a UDC visual assist value as an input source:
On the Command menu, select Set Header Control Value or Set Grid Cell Value.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
In the command pane of the JD Edwards Autopilot window, select a header control or grid column from the Header Control or Grid Column list.
Note. These values correspond to the UDC values that appear when you click the visual assist button for a control or column in a form. If the selection does not have a visual assist button, the UDC Visual Assist Value option does not appear in the Source of Input list.
Select the UDC Visual Assist Value option from the Source of Input list.
In the UDC Visual Assist Value list, select a UDC value.
Click the Insert button.
JD Edwards Autopilot runs the code path and inserts the UDC value in the script.
Some header controls and grid columns contain visual assists that require you to exit the current application and access a new one. If you have selected a header control or grid column that includes this type of visual assist–such as Address Book Master Search–JD Edwards Autopilot displays the Form Interconnect Visual Assist option in the Source of Input list. If you select this input source, JD Edwards Autopilot inserts a command to click the visual assist button in the form and writes an Application Interconnect command and Form command. You can then write any additional commands that you need.
Note. You do not use the value selection list when you select this option. After you access a new application and form, you can write the additional commands that you need as part of the script.
To use a form-interconnect visual assist as a source of input:
On the Command menu, select either Set Header Control Value or Set Grid Cell Value.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
In the command pane of the JD Edwards Autopilot window, select a header control or grid column from the Header Control or Grid Column list.
Select the Form Interconnect Visual Assist option from the Source of Input list.
Click the Insert button.
JD Edwards Autopilot automatically writes a command to click the visual assist button in the active form, and it then also creates an Application Interconnect command and a Form command.
You can clear the contents of a header control or grid column. JD Edwards Autopilot enables you to do this by selecting the Clear option from the Source of Input list in the command pane.
To clear an input from a header control or grid column:
On the Command menu, select Set Header Control Value, Set Grid Cell Value, or Set QBE Cell Value.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
In the JD Edwards Autopilot command pane, select the name of a header control or grid column from the Header Control or Grid Column list.
In the Source of Input list, select Clear.
Click the Insert button.
JD Edwards Autopilot clears the value from the selected header control or grid column.
See Also
After you select a header control or grid column and an input source for it, you complete the Type To command by selecting a value from the value selection list. JD Edwards Autopilot displays this list when you select a source of input and provides a caption according to the source of input that you select. You can also delete an entry in a control in a header or a processing option form or a grid column. To do this, select Clear from the Source of Input list.
To use the value selection list:
To input a literal value in the header control or grid column, type that value in the unpopulated value selection list.
To input the values that you assigned to a valid values list or variable, select the name of the list or variable from the value selection list.
To input a UDC visual assist value, you select one from the value selection list.
The literal value that you assign as an input in a header control or grid column can be numbers, letters, special characters, or a combination of these. Verify that the literal value that you assign is a valid input.
To assign a literal value:
In the command pane of the JD Edwards Autopilot window, select a header control or grid column name from the Header Control or Grid Column list.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
Select the Literal Value option from the Source of Input list.
In the value selection list labeled Literal Value, input the value assigned to the control or grid column.
Click the Insert button.
For input for a header control or grid column, you can assign a value from a valid values list. JD Edwards Autopilot selects the first value in the list the first time that you run the script. If you run it more than once, JD Edwards Autopilot selects the second value in the list on the second loop. This pattern continues until the loop ends or the item list is exhausted.
To assign a valid values list value:
In the command pane of the JD Edwards Autopilot window, select a header control or grid column name from the Header Control or Grid Column list.
Select the Valid Values List option from the Source of Input list.
In the value selection list labeled Valid Values List, select the name of a valid values list that you created.
Click the Insert button.
You can declare a variable, set its value, and assign that value to a header control or grid column. After you set the value, JD Edwards Autopilot stores it and it is available for use at any point in the script.
In the command pane of the JD Edwards Autopilot window, select a header control or grid column name from the Header Control or Grid Column list.
Select the Variable option from the Source of Input list.
In the value selection list labeled Variable, select the name of a declared variable to set a value.
Click the Insert button.
To assign a UDC visual assist value:
In the command pane of the JD Edwards Autopilot window, select a header control or grid column name from the Header Control or Grid Column list.
Select the UDC Visual Assist Value option from the Source of Input list.
In the value selection list labeled UDC Visual Assist Value, select the name of a UDC value.
Click the Insert button.
JD Edwards Autopilot enables you to select a form interconnect visual assist value for header controls or grid columns in forms that contain a visual assist that accesses a different application. You do not use the value selection list when you select the Form Interconnect Visual Assist option as a source of input. Instead, after you access the other application, you script an input in a header control or grid column in the active form by using the Press Toolbar Button command to find and select a value.
To assign a form interconnect visual assist value:
In the command pane of the JD Edwards Autopilot window, select a header control or grid column name from the Header Control or Grid Column list.
Select the Form Interconnect Visual Assist option from the Source of Input list.
Click the Insert button.
JD Edwards Autopilot clicks the visual assist button on the selected header control or grid column, and it then writes an Application Interconnect command and a Form command to the Script pane.
On the Command menu, select Set QBE Cell Value.
In the command pane, select the name of a grid column from the Grid Column list.
Select an input source from the Source of Input list.
Enter or select a value from the value selection list.
Click the Insert button.
On the Command menu, select the Press Toolbar Button option.
In the command pane, select the Standard Button option.
Select Find.
Click the Insert button.
On the Command menu, select the Press Toolbar Button option.
In the command pane, select the Standard Button option.
Click Select.
Click the Insert button.
JD Edwards Autopilot enters the value from the form interconnect visual assist in the header control of the selected form.
On the Command menu, select the Press Toolbar Button option.
In the command pane, select the Standard Button option.
Click Close or Cancel.
Click the Insert button.
On the Command menu, select Form.
In the command pane, select the name of the form that JD Edwards Autopilot exited by using the form interconnect visual assist.
Note. This command confirms that JD Edwards Autopilot has returned to the previous form. If you do not confirm the form, you cannot continue scripting.
Click the Insert button.
After you select from each of the three command pane lists, you click the Insert button to script the Type To command. JD Edwards Autopilot uses the selected information to write two command lines in the Script pane. One command line contains the context–header, grid, or QBE–and the repeat count for the node. The other contains the name of the selected header control or grid column; a symbol that indicates whether you selected a literal value, a valid values list, a variable, or a UDC visual assist value as the input source; and the assigned value.
You use the command pane lists to script inputs for the header portion of a form. Selecting the Set Header Control Value option in the Command menu establishes the header as the context in which you type data. The options that you select from the lists in the command pane create the Type To action command. When you click the Insert button, the command line that specifies the header control as the context appears as a node. The command line identifies the control that you select and the value that you type in it. JD Edwards Autopilot inserts subsequent Type To commands subordinate to the node.
To type data in a header control:
On the Command menu, select the Set Header Control Value option.
Select the name of a control from the Header Control list.
When JD Edwards EnterpriseOne software is running, a BlueCue highlights the control in the form that corresponds to the control that you selected in JD Edwards Autopilot.
Select an input source from the Source of Input list.
In the value selection list, enter a literal value or select the name of a valid values list, variable, or UDC visual assist value.
Click the Insert button.
Script inputs to additional header controls by selecting the Set Header Control Value option in the Command menu and repeating steps 1-5.
Some forms contain options that you can select. You select the Check Box/Radio Button option in the Command menu to write commands for these options in a script. The command to select an option is a different command than the Type To command, which you use to type data in header controls, grid columns, or QBE lines. However, when you work with a form that contains these options in its header, JD Edwards Autopilot inserts the command in the Header node along with any Type To commands that you write.
To script selecting options in a header:
On the Command menu, select the Check Box/Radio Button option.
In the command pane, select an option from the Radio Button or Check Box list.
If the option is a check box, select the Check or Uncheck option in the Source of Input list.
If the option is a radio button, the Source of Input list is unpopulated. JD Edwards Autopilot selects the radio button when you insert the command.
Before JD Edwards Autopilot can type data into a grid cell, it must know which grid cell; that is, which row and column in the grid. You specify the grid row by entering a separate Select Grid Row command into the script. This command must come immediately before the Set Grid Cell Value command. The Select Grid Row command identifies the row, and the Set Grid Cell Value command identifies the column. Furthermore, the Select Grid Row command must have the position for Add/Edit option set. This is vitally important and easily missed.
Important! Scripting the Select Grid Row and Set Grid Cell Value commands correctly is extremely important. It is common for new JD Edwards Autopilot users to script these commands incorrectly, which causes the script to fail. The Select Grid Row command is explained later in this chapter.
You use the command pane lists to script inputs in the grid area of a form. Selecting the Set Grid Cell Value option in the Command menu establishes the grid area as the context in which you type data. The options that you select from the lists in the command pane create the Type To action command. When you click the Insert button, the command line that specifies the grid detail area as the context appears as a node. The Type To command is indented beneath and attached to the node. The command line identifies the selected column and the value that you typed in it. JD Edwards Autopilot inserts subsequent Type To commands subordinate to the node. You can script different inputs to multiple rows of the grid, or you can use a playback loop in JD Edwards Autopilot to script the input in one row multiple times.
To enter a Type to Grid Cell command:
On the Command menu, select the Set Grid Cell Value option.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
In the command pane, select a grid column from the Grid Column list.
A BlueCue appears in the appropriate grid column in the form.
Select an input source.
Enter a literal value or select the name of a valid values list, variable, or UDC visual assist value.
Click the Insert button.
Script inputs for additional grid columns by clicking the name of another column in the Grid Column list and repeating steps 1-5.
To type values into additional grid cells in the same row:
In the Script pane in JD Edwards Autopilot, click a Detail Information command line that you inserted in the script.
The insertion cursor is connected to the selected node.
On the Command menu, select the Set Grid Cell Value option.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
In the command pane, select a grid column from the Grid Column list.
Select an input source.
Enter a literal value or select the name of a valid values list, variable, or UDC visual assist value.
Click the Insert button.
Repeat steps 1-6 each time that you want to script commands in a new row.
To script a playback loop:
Follow the steps for typing inputs in a grid row.
(Optional) Deactivate the Playback button in the toolbar.
In the Script pane, click the Detail Information command line that you want to play multiple times.
In the command pane, select an input source, such as literal value or variable, in the Define Repeat Count From list.
Enter a literal value or select the name of a variable that you created.
The value specifies the number of times that you want the inputs to loop (that is, to be entered in successive grid rows).
Click the Update button.
JD Edwards Autopilot enables you to select a UDC value for those header controls or grid columns in forms that contain UDC visual assists. The value selection form displays the valid UDC values for the selected control or column. If the control or column does not contain a UDC value, the UDC Visual Assist Value option does not appear in the Source of Input list.
You can script commands to enter data in the QBE line of a form that has a QBE line. Selecting the Set QBE Cell Value option in the Command menu establishes the QBE line as the context in which you type data. The options that you select from the lists in the command pane create the Type To action command. When you click the Insert button, the command line specifying the QBE line of the grid as the context appears as a node. The Type To command is indented beneath and attached to the node. The command line identifies the selected grid column and the value that you typed in it. JD Edwards Autopilot inserts subsequent Type To commands subordinate to the node. You can script different inputs in multiple rows of the grid, or you can script the input in one row multiple times, using a playback loop in JD Edwards Autopilot.
To type data in a QBE line:
On the Command menu, select the Set QBE Cell Value option.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
In the Grid Column list in the command pane, select the name of a grid column.
Select an input source.
Enter a literal value, or the name of a valid values list, variable, or UDC visual assist value.
Click the Insert button.
To script an input in the QBE line of another grid column, select another name in the Grid Column list and repeat steps 1-5.
On the Command menu, select the Press Toolbar Button option.
Select the Press Standard Button option.
Select Find.
Click the Insert button.
This section provides an overview of the Select Grid Row command and discusses how to:
Use the Operation Type list.
Use the Action on Grid Row list.
Use the Grid Columns list.
Use the Source of Row Number list.
The Select Grid Row command enables you to perform and test several important functions. You use it to work within a detail area of a form. You can select records, delete records, add to a grid row, or edit the entries in a grid row.
JD Edwards Autopilot enables you to click either a row or a grid cell, specify the row number or grid column, and perform a specific action, such as double-clicking the row or editing the content of the cell.
Note. When you select the Select Grid Row command, JD Edwards Autopilot also populates the command pane with a value selection list that enables you to enter a literal value or select the name of a previously created valid values list or variable. The caption of this list reflects the option that you select in the Source of Row Number list.
The Operation Type list in the JD Edwards Autopilot command pane enables you to select a row in a grid area either by specifying a row number or by specifying the value of a particular cell in a grid column.
Click by Row Number Option
The Click by Row Number option enables you to select a grid row by number. Selecting a grid row by number is faster than selecting a grid row by cell value, particularly if running against an HTML client and if the search involves many rows. JD Edwards Autopilot finds the designated row and performs the action selected in the Action on Grid Row list. You can designate the grid row by entering a literal value, a value from a valid values list, or a value from a variable in the value selection list.
Click by Cell Content Option
To select a grid row that contains a particular value, such as an item number, use the Click by Cell Content option and select a grid column and an action that you want to perform on the cell. JD Edwards Autopilot selects the grid cell rather than the entire grid row.
The Action on Grid Row list enables you to specify the purpose for selecting the row. In JD Edwards Autopilot, you can script these types of grid row operations:
Single-click a grid row.
Single-click a grid row button.
Double-click a grid row.
Double-click a grid row button.
Position grid row for add or edit.
Single-Click a Grid Row
You write a command to single-click a grid row when the form that is active does not have a row button. Although you can write this command when the active form has a row button, it is not recommended because single-clicking the grid row sometimes selects only a cell.
Single-Click a Grid Row Button
You write a command to single-click the grid row button when the form that is active contains rows with buttons. Clicking the grid row button selects the row, rather than a cell. Do not script this grid row operation in forms that do not contain a button.
Double-Click a Grid Row
To move from the detail area of one form to another form, exit to a new application, or double-click a row to perform a process, you write a command to double-click the grid row.
Double-Click a Grid Row Button
You write a command to double-click the grid row button when the form that is active contains grid rows with buttons. Do not script this grid row operation in forms that do not contain grid row buttons.
Position Grid Row for Add/Edit
Before entering a value into a grid cell, you must select the grid row and position it for add/edit using the Position Grid Row for Add/Edit option. You must use this option with the commands on the Action on Grid Row list immediately preceding a Set Grid Cell Value command. Failure to script these commands in the correct order is the most common JD Edwards Autopilot scripting error.
You use the Grid Columns list only when you have selected the Click by Cell Content option. When you select this option, JD Edwards Autopilot populates the Grid Columns list with the names of all the columns in the grid that is active. You can scroll through this list to find the name of a column.
After you select Click by Cell Content, you can use the Source of Row Number list to specify a value that might exist in a particular cell of that column. JD Edwards Autopilot searches for the value and selects the first row that contains that value in the specified column.
In the Source of Row Number list, you select the source of the value that you use to select the grid row. You can select the Literal Value option, in which case you type a row number or a grid cell value in the value selection list. You can select the Valid Values List option, in which case you select from the value selection list an existing valid values list. JD Edwards Autopilot uses the first value in the list to select a grid row either by row number or by cell content. You can select Variable, in which case you select from the value selection list a variable for which you have declared a name and set a value. JD Edwards Autopilot uses this value to select a grid row either by row number or by cell content.
This section provides an overview of scripting the Select Grid Row command and discusses how to:
Click by row number
Click by cell content
Perform grid row operations
To begin the scripting, open a form. Populate the detail area by writing a command to click Find. When the grid is populated, use the JD Edwards Autopilot command pane to select the row that you want to target for the script and the operation that you want to perform on that row. You can select a grid row either by row number or by cell content.
In either case, you select the type of operation that you want to perform on the grid row. Operations include single-clicking the row, single-clicking the row button, single-clicking to perform an add or edit, double-clicking the row, or double-clicking the row button.
To finish scripting the Select Grid Row command, select a value source for row selection. Possible sources include a literal value, a valid values list, or a variable. You then either enter a literal value in the value selection list or use the value selection list to select a valid values list or variable.
After you populate the grid, you can use JD Edwards Autopilot to select a row by searching for a row number that you designate. To complete this command, you must also select an action that you want JD Edwards Autopilot to perform on the grid row, select a source of value that JD Edwards Autopilot uses to select the row, and select or enter the value of the row.
To click a grid row by row number:
On the Command menu, select the Press Toolbar Button option.
Select the Press Standard Button option.
Click Find.
JD Edwards Autopilot fills the detail area in the active form.
On the Command menu, select the Select Grid Row option.
In the JD Edwards Autopilot command pane, select the Click by Row Number from the Operation Type list.
Select a grid row action from the Action on Grid Row list.
Select a value source from the Source of Row Number list.
In the value selection list, enter a literal value or select the name of a valid values list or variable.
Click the Insert button.
You can have JD Edwards Autopilot search the detail area for a particular value, and then select the row after it finds a cell that contains that value. In this case, you can write a command to click the grid row using cell content rather than row number.
Writing a command to select a grid row based on cell content involves the same steps that you use to write a command to select the row based on row number. However, when you select a row based on cell content, you must also select a grid column as a search criterion.
To click a grid row by cell content:
On the Command menu, select the Press Toolbar Button option.
Select the Press Standard Button option.
Click Find.
JD Edwards Autopilot fills the detail area in the active form.
On the Command menu, select the Select Grid Row option.
In the JD Edwards Autopilot command pane, select the Click by Cell Content from the Operation Type list.
Select a grid row action from the Action on Grid Row list.
In the Grid Columns list, select a grid column in which you want JD Edwards Autopilot to search for a value.
Select a value source from the Source of Row Number list.
In the value selection list, enter a literal value or select the name of a valid values list or variable.
Click the Insert button.
After you select a row, you can perform these operations on it:
Single-click a grid row.
Single-click a grid row button.
Double-click a grid row.
Double-click a grid row button.
Position a grid row for add or edit.
Note. Select the single-click and double-click grid row operations when you are writing commands to test a form that contains a detail area that does not have row buttons. You can use these options before you write other JD Edwards Autopilot commands. For example, single-clicking a grid row or grid row button enables you to write a command to click the Select or Delete button. Double-clicking a row enables you to access another form or application. clicking a row and positioning for add or edit enables you to edit the selected grid row
To single-click a grid row:
On the Command menu, select the Select Grid Row option.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
Select an operation from the Operation Type list.
Select the single-click option in the Action on Grid Row list.
Select a value source from the Source of Row Number list.
In the value selection list, enter a literal value or select a valid values list or variable.
Click the Insert button.
To double-click a grid row:
On the Command menu, select the Select Grid Row option.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
Select an operation from the Operation Type list.
Select the double-click option in the Action on Grid Row list.
Select a value source from the Source of Row Number list.
In the value selection list, enter a literal value or select a valid values list or variable.
Click the Insert button.
On the Command menu, select either the Form option or the Application Interconnect option.
In the command pane, select the next form or application that appears when you double-click the row in the form.
Click the Insert button.
To single-click a grid row button:
On the Command menu, select the Select Grid Row option.
Select an operation from the Operation Type list.
Select the single-click row button option in the Action on Grid Row list.
Select a value source from the Source of Row Number list.
In the value selection list, enter a literal value or select a valid values list or variable.
Click the Insert button.
To double-click a grid row button:
On the Command menu, select the Select Grid Row option.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
Select an operation from the Operation Type list.
Select the double-click row button option in the Action on Grid Row list.
Select a value source from the Source of Row Number list.
In the value selection list, enter a literal value or select a valid values list or variable.
Click the Insert button.
On the Command menu, select either the Form option or the Application Interconnect option.
In the JD Edwards Autopilot command pane, select the next form or application that appears when you double-click the row button on the form.
Click the Insert button.
To position a grid row add or edit:
On the Command menu, select the Select Grid Row option.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
Select an operation from the Operation Type list.
Select the Position for Add/Edit option in the Action on Grid Row list.
Select a value source from the Source of Row Number list.
In the value selection list, enter a literal value or select a valid values list or variable.
Note. During script playback, if the row number specified in the script is larger than the total number of rows in the grid, JD Edwards Autopilot positions itself at the bottom of the grid. A subsequent Set Grid Cell Value command will type to the blank row at the bottom of the grid, assuming that there is a blank row. By convention, many JD Edwards Autopilot users specify row 999 to go to the bottom of the grid.
In the Command menu, select the Set Grid Cell Value option.
Select a grid column in the Grid Column pane.
Select an input source in the Source of Input pane.
Enter a literal value or UDC value, or select a valid values list or a variable from the value selection list.
Click the Insert button.
JD Edwards Autopilot adds to or edits the column in the selected grid row.
Important! For grid row operations to be successful, you must script these commands in the order shown above. Failure to do so is the most common JD Edwards Autopilot scripting error and will cause the script to fail.
This section provides an overview of the Press Toolbar Button command and discusses how to:
Use the Standard Button option.
Use the Custom Button option.
Use the Select Grid Tab option.
Use the Grid Scroll Button option.
The Press Toolbar Button command enables you to script many actions in JD Edwards EnterpriseOne applications, including clicking a toolbar button, selecting a command from an application menu, selecting a command from the exit bar, and scrolling the grid.
The Standard Button option in JD Edwards Autopilot contains button-clicking selections that match the buttons in the toolbars of forms. For example, the toolbar in some forms features 10 button-clicking options. When one of these forms is active, the Standard Button tree in the Button list in JD Edwards Autopilot contains the same options.
When you script one of these button-clicking options, JD Edwards Autopilot runs the command exactly as it would be run in a JD Edwards EnterpriseOne form. For example, you might script clicking the OK button to update the database after you have entered new data on a form.
When you select the Standard Button option, the Next Form list also appears. The option that you select from this list indicates the form that is active when you click the Insert button.
Note. Clicking a standard button, such as Add, occasionally takes you to another application. In this case, you must write an Application Interconnect command instead of completing the Next Form field.
When you launch a UBE, the standard button options in JD Edwards Autopilot also match the buttons in the menu bar of the form. For example, when you need to submit a UBE using the Version Prompting form, select Submit from the Standard Button options in JD Edwards Autopilot.
See Also
Use the Custom Button option to script a selection from the Row menu, Form menu, or Report menu. Selecting from the Row menu or the Form menu usually results in accessing a different application, in which case you must also script an Application Interconnect.
Although you use both the Custom Button option and the Application Interconnect command to interconnect applications, they perform slightly different functions. You script an Application Interconnect command after you have exited to a new application–for example, by clicking the Add button. You can use the Custom Button option before you exit to a new application. The Custom Button option enables you to select the application and form in the command pane and insert the commands. JD Edwards Autopilot interconnects the applications, and the form in the new application appears.
When you select the Custom Button option from the Button list in the command pane, these options appear in the tree:
Form
Row
Report
Selecting either or both of these options further expands the tree and displays the available menu options.
Note. The options in the Form and Row menus correspond to the options that appear in the drop-down menu when you click Form or Row
in the menu bar of the active form. When you insert a command to click a standard button and to click a custom button, the
same symbol appears in the command lines of the script. However, the command line for clicking a standard button describes
the command as the Press Toolbar Button command, whereas the command line for clicking a custom button describes the command
as the Select Menu Exit command. When you click a standard button, you usually access forms in the same application. When
you click a custom button, you usually access a new application.
The command line for clicking a custom button contains the type of menu exit, either Form or Row, and the name of the menu
item that you select. The Select Menu Exit command line should be followed by the Application Interconnect command line, which
records the application that you access.
Form Exit
JD Edwards Autopilot enables you to script a selection from the Form menu, just as you might select a menu option in a JD Edwards EnterpriseOne form. Typically, you perform a form exit when you want to access a form that is related to the current form. However, the new form might exist in a different application, and the exit represents a change in the standard sequence of forms that you access when you perform a transaction.
Row Exit
JD Edwards Autopilot enables you to script a selection from the Row menu, just as you might select one directly in a JD Edwards EnterpriseOne form. Typically, you perform a row exit when you want to move from a particular grid row in a form to a related form. That form might be in a different application, and the exit represents a change in the standard sequence of forms that appear when you perform a transaction.
You can also use the Custom Button option to perform a row exit that launches a UBE version. In this case, you write a UBE command after you script the row exit, and JD Edwards Autopilot automatically submits the UBE.
See Also
Launching a UBE from a Row Menu
You use the Select Grid Tab option in JD Edwards Autopilot to test whether the system accesses customized grid tabs that you have created. In JD Edwards EnterpriseOne software, you customize the grid by selecting Preferences, Grid, New Format. To create a new tab, you select fonts, the number of grid columns, the width of grid columns, and so on. Each grid configuration creates a new tab. After you create as many custom tabs as you need, you can use JD Edwards Autopilot to script the selection of tabs. You determine whether the tab is selected, and you can also determine whether the customized changes appear.
Note. The Select Grid Tab features works with Windows-based JD Edwards EnterpriseOne applications only; it does not work with web-based JD Edwards EnterpriseOne applications.
You use the Grid Scroll Button option in JD Edwards Autopilot to script clicking the up and down arrows in the detail area of a form. JD Edwards Autopilot moves the arrows up or down by line or by page.
This section provides an overview of scripting the Press Toolbar Button command and discusses how to:
Click a standard button.
Click a custom button.
Select a grid tab.
Click the grid scroll button.
You use the Press Toolbar Button command in JD Edwards Autopilot to script many important functions. For example, clicking the Add button enables you to access a new form, either in the same application or a new one. By selecting the Standard Button option for the Press Toolbar Button command, you can write a script command to click the Add button. Other Press Toolbar Button options enable you to perform form and row exits, select a grid tab, or scroll through a grid.
In general, you select the Standard Button option to click a toolbar button in a form. When you select this option, the options in the command pane match the toolbar buttons on the active form.
To move from one form to another using the Add button:
On the Command menu, select the Press Toolbar Button command.
Select the Standard Button option, and then select Add.
Select the name of a form from the Next Form list or select Unknown/None for another application.
Important! If you select the Unknown/None option and then click the Insert button, ensure that the Form command line in JD Edwards Autopilot matches the active form. On the Command menu, select Form, select the name of the active form, and then click the Insert button.
Click the Insert button.
The next form appears.
If you select the Unknown/None option and the form that appears is part of a different application, complete steps 5 through 8 to script an Application Interconnect command.
On the Command menu, select the Application Interconnect option.
From the Application list in the command pane, select the name of the active application.
From the Form list in the command pane, select the name of the active form.
Click the Insert button.
To move from one form to another by using the Select button:
On the Command menu, select the Select Grid Row option.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
In the Source of Row Number list in the command pane, select literal value, valid values list, or variable.
To specify the row number to select, enter or select a value from the value selection list.
Click the Insert button.
On the Command menu, select the Press Toolbar Button option.
Select the Standard Button option, and then select the Select option.
In the Next Form list, select the form that appears next.
Click the Insert button.
Note. If you select the Unknown/None option from the Next Form list, use the Form command to confirm the new form after it appears. If the form that appears is part of a different application, you must script an Application Interconnect command.
To update the database:
On the Command menu, select the Press Toolbar Button option.
Select the Standard Button option, and then click OK.
If you are accessing a new form, select it from the Next Form list; if not, do not make a selection from the list.
Click the Insert button.
To fill a grid:
On the Command menu, select the Press Toolbar Button option.
Select the Standard Button option, and then select Find.
Click the Insert button.
To delete a record:
On the Command menu, select the Select Grid Row option.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
In the Source of Row Number list in the command pane, select literal value, valid values list, or variable.
To specify the row number to be selected, enter or select a value from the value selection list.
The row number should contain the record that you want to delete.
Click the Insert button.
Select the Press Toolbar Button option from the Command menu.
Select the Standard Button option, and then select Delete.
Click the Insert button.
To exit a form:
On the Command menu, select the Press Toolbar Button option.
Select the Standard button option, and then select either Cancel or Close, depending on the button that is available on the form.
Click the Insert button.
See Also
Launching a UBE from a Row Menu
You use the Custom Button option to script selections from the Row menu and the Form menu. When you select this option, the selections in the command pane match the form and row exits in the active form.
Remember that a form or row exit might result in an application interconnect. To script the application interconnect, use the command pane to select the menu option, the next form, and the application before you click the Insert button.
To script a form exit:
On the Command menu, select the Press Toolbar Button option.
Select the Custom Button option, and then select Form.
Select a form exit.
If the form exit results in the system launching a new application, select the new application from the Application list.
From the Next Form list, select a form, if necessary.
Click the Insert button.
To script a row exit:
On the Command menu, select the Press Toolbar Button option.
If the detail area in the active software form is empty, select Find.
Click the Insert button.
In the application form, the detail area loads.
On the Command menu, select the Select Grid Row option.
Note. To display the new form, you can select Row from the menu bar in JD Edwards EnterpriseOne, click one of the forms in the list,
or click Select.
You can determine the name of the newly active application and form by clicking the About JD Edwards option in the menu bar.
Select the single-click row button from the Actions on Grid Row pane.
In the Source of Row Number list in the command pane, select a literal value, valid values list, or variable.
To specify the row number to be selected, enter or select a value from the value selection list.
Click the Insert button.
On the Command menu, select the Press Toolbar Button option.
From the Button list in the JD Edwards Autopilot command pane, select the Custom Button option.
Click Row.
Select a Row exit.
Note. If you run a row exit to launch a UBE, you do not make a selection from the Application or Next Form list that appears. You select the row exit only, click the Insert button, and then write a UBE command.
If you are exiting to an interactive application, select that application from the Application list.
Select a form name from the Next Form list.
Click the Insert button.
You can select customized grid tabs by using the Select Grid Tab command. JD Edwards Autopilot selects the grid tab number that you script and, in the play back while scripting mode, displays the grid with your changes.
To script the Select Grid Tab option:
In a form, create as many tabs as you need.
On the Command menu, select the Press Toolbar Button option.
In the Button list, select the Select Grid Tab option.
In the Literal Value list, enter the number of the grid tab that you want to select.
From left to right, the first grid tab is 1, the second grid tab is 2, and so on.
Click the Insert button.
Note. The Select Grid Tab features works with Windows-based JD Edwards EnterpriseOne applications only; it does not work with web-based JD Edwards EnterpriseOne applications.
When you are working in a form with a populated detail area, you can scroll through the detail area from top to bottom or from page to page.
To script the Grid Scroll Button option:
On the Command menu, select the Select Grid Row option.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
In the command pane, under Operation Type, select the option to click by row number.
In the Action on Grid Row list, select single-click.
Select a source of row number and enter a literal value or select a variable or valid values list.
Click the Insert button.
On the Command menu, select the Press Toolbar Button option.
Select the Grid Scroll Button option.
Select one of these scrolling options in the tree:
Page Up
Page Down
Click the Insert button.
You can use the Press Toolbar Button command to script clicking standard toolbar buttons, performing custom functions, selecting grid tabs, and selecting grid scroll buttons. However, some applications contain special buttons that do not appear on the toolbar or menu bar.
You use the Press Push Button command to script clicking these oversized buttons and clickable bitmaps. JD Edwards Autopilot displays uses the command pane to display the button options and clickable bitmaps in the active form.
This section discusses how to:
Use the push button options.
Use the clickable bitmap options.
Some applications, such as System Setup (P0000), contain forms that use oversized push buttons. Pushing these buttons enables you to select forms on which you can set up, for example, constants for general accounting, accounts payable, accounts receivable, and so on.
Note. You cannot click these buttons using a Press Toolbar Button command because they do not appear on the toolbar. Therefore, if you use the Press Toolbar Button option in the JD Edwards Autopilot Command menu, none of these push button options appears in the command pane. Alternatively, if you select the Press Push Button option, the command pane uses the Select Button to Press list to display the button options that appear on the form.
When you write a command to click a button, you often access a new form. You can write a Form command for the new form so that the JD Edwards Autopilot script matches the actions that you take in the software. Sometimes, when you click a button, you access a new application. In that case, you must write an Application Interconnect command in JD Edwards Autopilot. You can verify whether you have accessed a new application by clicking Help and About JD Edwards in the toolbar of the active form.
Some applications, such as Cross Reference (P980011), use clickable bitmaps that enable you to access a new form. Because you cannot use these options by clicking a button on the toolbar, you cannot use the Press Toolbar Button command.
Instead, to click a bitmap option, you use the JD Edwards Autopilot Press Push Button command. If a form that contains clickable bitmaps is active, the JD Edwards Autopilot command pane displays the available bitmaps.
Note. For each clickable bitmap, JD Edwards Autopilot displays the system-assigned name, such as Bitmap 184, rather than the descriptive label that appears next to the bitmap on the form. In addition, the control properties for the bitmaps do not indicate their identities. Therefore, you must identify the particular bitmap that you want JD Edwards Autopilot to click. To help you identify the name of the bitmap, a BlueCue appears with the descriptive label on the form when you click the corresponding name in the JD Edwards Autopilot command pane.
When you script clicking a clickable bitmap, you typically access another form, and you must write a Form command in JD Edwards Autopilot to match the actions. If you access a new application when you click a clickable bitmap, you must write an Application Interconnect command in JD Edwards Autopilot so that the current application in the script matches the active application.
When you write a Press Push Button command, you enable a script to perform actions that you cannot script with the Press Toolbar Button command. You need to script a Press Push Button command when you are working on a script that tests applications and forms that contain buttons and clickable bitmaps that do not appear on the toolbar of the form. Writing a command to click a button or clickable bitmap enables you to access another form in the application. In some cases, this command enables you to exit to another application.
This section discusses how to:
Click a button.
Click a bitmap.
Suppose that you need to test an application, such as System Setup (P0000), that includes forms with oversized buttons that do not appear on the toolbar. In most cases, you click these buttons to access a new form in the same application or to exit to a new application.
Scripting the Press Push Button command in JD Edwards Autopilot enables you to click the button in the form. You cannot write a Press Toolbar Button command to perform this action because the Press Toolbar Button command does not apply to push buttons on the form.
To click a button in a form:
On the Command menu, select the Press Push Button option.
JD Edwards Autopilot populates the command pane with button options only when the active form contains buttons.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
In the JD Edwards Autopilot command pane, select a button from the Select Button to Press list.
Click the Insert button.
If clicking the button accesses another form in the same application, select Form from the command menu.
In the Form list of the command pane, select the name of the active form.
Click the Insert button.
If clicking the button accesses a new application, select Application Interconnect from the Command menu.
In the command pane, select one of these options:
Application (to select the active application)
Form (to select the active form)
Click the Insert button.
Some applications contain forms that use clickable bitmaps that do not appear on the toolbar. To test one of these applications, you must script a Press Push Button command to click a bitmap. In the command pane, JD Edwards Autopilot displays the system-assigned name for each bitmap, rather than the descriptive text that appears next to each bitmap. If you click the system-assigned name in the command pane, JD Edwards Autopilot identifies the corresponding clickable bitmap on the form by enclosing it in a BlueCue.
Scripting a Press Push Button command to click a bitmap enables you to access another form or application. You cannot click the bitmap by writing a Press Toolbar Button command because the bitmaps do not appear on the toolbar.
To click a bitmap in a form:
On the Command menu, select the Press Push Button command.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
From the Select Button to Press list, select the name of a tab in the active form.
Click the node next to the tab name.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
From the drop-down menu, select the system-assigned name of a clickable bitmap.
Note. When you click the bitmap name, the BlueCue that appears in the active form identifies the corresponding bitmap.
Click the Insert button.
If clicking the button accesses another form in the same application, select Form from the Command menu.
In the Form list of the JD Edwards Autopilot command pane, select the name of the active form.
Click the Insert button.
If clicking the button accesses a new application, select the Application Interconnect option in the Command menu.
In the command pane, select one of these:
Application (to select the active application)
Form (to select the active form)
Click the Insert button.
Some applications–such as Object Management Workbench (P98220) and Expense Report Review / Entry (P09E2011)–use combo box controls. These controls can appear on forms as edit text fields, pop-up menus, or scrolling lists. JD Edwards Autopilot provides the text from the combo box in the command pane. After you write a Select ComboBox Item command and play back the script, JD Edwards Autopilot locates the combo box and sends a message to the form to select the text string specified in the command pane.
When you select the command, JD Edwards Autopilot populates the Combo Box list in the command pane with either a list or a tree control. A tree control appears in the command pane only when the combo box is under tab controls in the active form.
In the Combo Box list, when you click the name of a control or an item in a scrolling list or pop-up menu, JD Edwards Autopilot populates the Choices list with the text names that appear in the combo box, along with the user defined system codes, which it retrieves from table F0005.
Forms in some applications include hidden combo box controls that are not used. JD Edwards Autopilot displays these controls in the Choices list, just as it displays hidden header controls and grid columns in the command pane. You cannot select a default value, such as None, to enter in the combo box.
When you write scripts that use forms that contain combo box lists, you select the Select ComboBox Item command from the Command menu of the JD Edwards Autopilot window and select a combo box from the Combo Box list in the command pane.
The Select ComboBox Item option is available in the Command menu of the JD Edwards Autopilot window only if you launch an application and form that use combo boxes.
After you select an option from the Combo Box list, JD Edwards Autopilot populates the Choices list with the available items in the combo box.
Some applications, such as Object Management Workbench (P98220), use more than one combo box list, and the lists depend on one another to establish, for example, search criteria. In these cases, the selection that you make in the Combo Box list in the JD Edwards Autopilot command pane changes the items in the Choices list.
To script the Select ComboBox Item command:
From the Command menu, select Application.
In the command pane, select an application and Fast Path, and then click the Insert button.
From the Command menu, select the Select ComboBox Item option.
From the Combo Box list, select a combo box.
The system populates the Choices list with the items in the combo box.
From the Choices list, select a combo box item.
Click the Insert button.
JD Edwards Autopilot enters the item from the Combo Box list to the control in the form.
Some JD Edwards EnterpriseOne applications use tree controls and parent/child tree forms. To write script commands for forms in these applications, you must use the Build Tree Path command to create a unique path that uses the tree path in a form.
You use the Build Tree Path command using any combination of literal text or variables. For example, the first node in a tree might consist of a parent, one child, and one grandchild. To use JD Edwards Autopilot to write the Build Tree Path command, you first designate the data type that represents the first node in the tree path. Available data types include:
Literal values, which are the precise text that designates a node in a tree control.
Variable values, which you set as the text that designates a node in a tree control.
Ordinal values, which represent the order in which a node appears in a tree path, such as first, second, third, and so on.
You select Ordinal as the data type when you want to build a path to the first node in the tree (the parent), the first child of the parent, and the first grandchild of the parent. Clicking the Add button populates the tree path list with a leaf node, which is a node without children. You can create parent-child relationships by clicking the Add button to add nodes.
During playback, JD Edwards Autopilot uses the search string that you create to select the specified node in the tree in the active form. You can modify the tree path as necessary using the Add and Remove buttons. Removing the parent node also removes all children from the path. To add a node, you must add it to a leaf node.
If you attempt to add a child node to a parent that already has a child, JD Edwards Autopilot displays a dialog box indicating that you that cannot add a child to the node. You must click a leaf node to create a new node with a child.
This section provides an overview of scripting the Build Tree Path command and discusses how to:
Build a tree path using variable values.
Build a tree path using literal values.
Add a parent node or child to a tree path.
Remove a parent node or a child from a tree path.
You use the Build Tree Path command to write scripts that test applications that use tree controls. You can use any combination of variables or literal text to build a unique path to nodes that exist in the tree path in an active form. You can also modify the tree path by adding and removing nodes from the path that you build.
You can select one of these methods to use variable values to build a tree path:
Declare a variable and set its value as the text that represents a node in the tree.
In this case, you select Variable as the data type for the node.
Set a numeric value for the variable.
If you select 3 as the value, JD Edwards Autopilot selects the third node in the tree or the third child of a parent. In this case, you select Ordinal as the data type for the node.
Whether you select Variable or Ordinal as the data type for the node, the names of the variables you declared appear in the Select Variable list of the command pane.
Note. Before building the tree path, declare a variable and set its value.
See Using a Variable as a Source of Input.
To build a tree path using variable values:
From the Command menu, select Variables.
Declare a variable and set its value.
Note. You can assign any value to the variable. However, remember that if you assign a numeric value, that value represents the position of a parent node or a child in the tree path. For example, if you set the value of the variable to3, the value represents the third node in the tree control.
When a form that uses a tree control is active, from the Command menu, select Build Tree Path.
The JD Edwards Autopilot command pane contains a Tree Path list and a Data Type list.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
Select one of these options from the Data Type list:
Text Variable
Select Text Variable if the variable that you want to use has a text value.
Ordinal Variable
Select Ordinal Variable if the variable that you want to use has a numeric value.
From the Select Variable list, select a variable for which you have set a value.
Click Add.
JD Edwards Autopilot inserts the variable as a node in the Tree Path list.
You can build a tree path using a literal value as the data type to represent a node. You type the name of the node in the Enter Node list exactly as it appears on a form. To create the tree path, you can use literal values as a data type in combination with variable and ordinal values.
To build a tree path using literal values:
In the JD Edwards Autopilot window, launch an application and form that uses tree controls.
From the Command menu, select the Build Tree Path option.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
Select one of these options from the Data Type list:
Text Literal
Select Text Literal to use a text value.
Ordinal Literal
Select Ordinal Literal to use a numeric value.
In the Enter Node list, type a literal value.
Click Add.
JD Edwards Autopilot inserts the literal value as a node in the Tree Path list.
When you play back the script, JD Edwards Autopilot finds the node with the literal value, based on the tree path that you build.
After you select a data type and enter a literal value or select a variable, you add a tree path node by:
Clicking the Add button with the Tree Path list in the command pane unpopulated
Selecting a node in the tree path list that does not have a child and clicking the Add button.
Remember, you cannot add to a node that already has a child.
To add a parent node or child to a tree path:
In the Tree Path list of the JD Edwards Autopilot window command pane, click a node that does not have a child.
In the Form/Subform Hierarchy list, select the appropriate form or subform.
Select one of these options from the Data Type list:
Text Literal
Text Variable
Ordinal Literal
Ordinal Variable
Select a variable from the value selection list or enter a literal value in the Enter Node list.
Click Add.
To remove a parent node or a child from a tree path:
In the Tree Path list of the JD Edwards Autopilot window command pane, click a parent node or a child.
To remove a parent node and its child, select the parent node, and then click Remove.
To remove the child only, select the child, and then click Remove.
You can modify a tree path by selecting a node or a child and clicking the Remove button. Remember, removing a node also removes the child of the parent.
This section provides an overview of using the Database Validation command and discusses how to:
Define validation.
Use validation declaration.
Use validation association.
Execute validation.
Use the Expect No Matching Records option.
Use the data validation action commands to verify data in the JD Edwards EnterpriseOne database.
The data validation process in JD Edwards Autopilot consists of these steps:
Declaration, in which you give the validation a name.
Association, in which you pair expected values with columns in a database table.
Execution, in which you execute your association criteria to verify whether the expected data exists in the database.
You can also verify that the system deleted records from the database.
You script validation commands to compare a data set that you created in JD Edwards Autopilot and ran in JD Edwards EnterpriseOne software with a data set that was written to the database. These commands confirm that the system has entered records in the database as you expected. You also use validation for process testing, to verify that data moved as you intended it to move through a sequence of applications that are included in a transaction cycle. Finally, you use validation to validate values that cannot be accessed through JD Edwards Autopilot, such as century information. In most transaction fields, you make no entry for century. Using validation commands, you can verify that century data actually appears in the database.
You script a new database validation command each time that you declare a validation. You can declare a validation at any point in the script.
The declared validation includes:
A validation name that you select
A table to be validated, which you select from a list
Declaring the validation is similar to declaring a variable in that it provides only a name for the validation. In essence, it provides the means to store values.
Associating a validation enables you to store data. You can gather this data from different points in the script. No action is taken when you associate a validation. You merely associate data with the declared validation command.
In associating a validation, you define the values to be validated against chosen columns in the database. You select a column, which cannot be associated more than once in a script, such as ABALPH–NameAlpha in the Address Book program (P01012)–and you associate that column with a value, which can be derived from a literal value, variable, header control, or grid column. You then select a database value type that JD Edwards Autopilot uses to validate the data that you enter in the database when you run the script.
You must specify this information to script the validation association:
Validation name (declared validation).
Database column identification, which you select from a list.
Source of expected data, such as a header control.
Database value type, either key selection or validation value.
Validation association can occur at as many different points in the script as you select, but you must use both a key selection value and a validation value.
Key Selection and Validation Values
Each validation association must be marked as either a key selection valueor a validation value. Key selection values identify the database rows to be validated. They become part of the WHERE clause that JD Edwards Autopilot generates when the validation is executed. Validation values are the values JD Edwards Autopilot compares against the specified columns in the selected records. A validation normally has at least one key selection value and at least one validation value.
You run the validation using the record selection criteria that you establish in validation association. JD Edwards Autopilot retrieves the specified data from the database through SQL. You can then compare the retrieved data with the data that you expected the system to return. Running the validation indicates whether the data that you entered and stored during association actually updated the database in the condition that you specified.
These actions occur when you script running the declared and associated validation:
A SQL SELECT statement is generated.
The system queries the database for the specified data.
The system compares the returned data to the expected data.
The generated SQL statement contains the table that you select when you declare the variable, the validation value columns that you select during association, and the key selection that you make during association.
A SQL statement that you generate when you run the validation might contain the identity of the table that contains the expected data (for example, F0101), the columns that contain the expected data (for example, ABALPH, ABAT1 and ABAN8), and the key column that selects the records to be validated (such as ABAN8).
The SQL statement queries the database and retrieves data that conforms to the statement elements. JD Edwards Autopilot compares the results of that query against the results that you expected, based on the data that you stored during validation association.
If you made an error in scripting the validation associations, JD Edwards Autopilot records an error when it executes the Validation Execution command. For example, if you do not select a key column during association, JD Edwards Autopilot notifies you that no record selection criteria have been chosen. If you associate the key column with an incorrect header control, grid column, or variable, JD Edwards Autopilot indicates that the SQL statement contains an error.
In either of these cases, you can make any necessary corrections to the script. In addition, running a validation that fails does not stop the script from playing through to completion. The test results compare the data that you expected to return with the data that is actually returned.
If you enter a record, successfully validate it, and then write a command to delete the record, you can validate that the system successfully deleted the record from the database. To do so, you run the validation again and select the Expect No Matching Records option. When you run the script, JD Edwards Autopilot again checks the database. The validation runs successfully if JD Edwards Autopilot indicates that the record that you deleted from the database no longer exists. When you select this option, JD Edwards Autopilot verifies that no records match the key selection criteria you specified.
You enter database validation action commands as you write a script. No formula exists to determine where the commands must occur. However, each of the three phases–declaration, assignment, and execution–must occur for the validation to take place.
This section discusses how to declare a validation.
You can declare one or more validations as soon as you begin a script. You do not have to place the validation declaration command line at the top of the script if you want the validation to be effective within any node in the script, as you do when you declare a variable. However, declaring the validation early enables you to easily store data through association as you write the script.
To declare a validation:
From the Command menu, select the Declare New Validation option.
In the command pane, enter a name in the Validation Name list.
It is conventional to name the validation the same as the table it validates.
Select an option in the Database Table list.
This selection identifies the database table against which you validate data from JD Edwards Autopilot.
Click the Insert button.
After you declare the validation, you have a place in which you can store values. During validation association, you select values that you want to validate and you pair (or associate) those values with values in the database.
You can write scripts that test scenarios that involve multi-currency with both accounting methods Y and Z. For example, you can use divisors instead of multipliers for exchange rate calculations.
There are two types of validation associations:
Association Type |
Description |
Key selection value |
Associations that determine which database record (row) you verify. |
Validation value |
Associations that specify columns within that row whose values you want to verify. |
A validation normally includes at least one key selection value association and at least one validation association.
To associate a validation:
From the Command menu, select the Associate a Validation Column option.
Select a validation name that you created using the Declare New Validation option by scrolling through the list and clicking a name.
Select a column name from the Database Column list.
Make the appropriate choice in theValue Type group box.
This option associates the selected column with a particular value.
(Optional) In the Currency Type group box, select one of these currency options:
Domestic
Foreign
Note. If you have not declared a currency validation, the system hides and disables these options. You must declare a currency validation to use these options.
Click a selection from the Source of Expected Data list.
The source can be a literal value, variable, header control, or grid column.
In the value selection list, enter a literal value or select the name of a variable, header control or grid column.
This step specifies the value that you associate with the database column.
Note. With the play back while scripting feature activated, if you select a header control or grid column, JD Edwards Autopilot uses a BlueCue to highlight the designated control or column in the form. Be sure to select a header control or grid column to which you have previously entered a value. Likewise, if you have selected the name of a variable, be sure that you have followed the steps outlined previously for setting the variable's value.
Click the Insert button.
Repeat steps 1 to 8 for as many key values and validation values as you need.
Data from all the individual columns from which you expect to have data returned is now associated with a single key column.
After you have declared the validation and associated the data with database tables and columns, you can execute the validation.
To execute a validation:
From the Command menu, select the Execute Validation option.
From the drop-down menu in the Validation Name list, select a validation.
Note. JD Edwards Autopilot populates the SQL Statement list. The statement contains the data dictionary aliases of the tables and columns that you associated with the data that you entered, and the key selection value.
Click the Insert button.
Later in the script, you might delete the records. You can validate that these deleted records are no longer in the database.
Repeat steps 1-3.
Select the Expect No Match Records check box.
Click the Insert button.
Note. You can declare and set the value of a variable to test validation success.
Sometimes, you may need to run other programs within a JD Edwards Autopilot script. For example, you might prepare a PowerPoint or Excel presentation that you want to include within the script. After you run that presentation, you might decide to close the program and then return to JD Edwards Autopilot to continue scripting inputs.
You can complete these tasks by selecting the Command Line option from the Command menu. Type the path to the program that you want to run. (This is similar to using the Run function in Microsoft Windows.) JD Edwards Autopilot opens the program and the document or presentation that you created.
You can also send a command line message to create screen shots of JD Edwards EnterpriseOne software forms at designated points in the script playback process. You can create the screen shots in a particular language version, and you can store them in a directory and file that you create.
Scripting the Command Line command requires that you know the path to the program that you want to run and, for example, a document in the program that you want to open. You can also create a Command Line command that creates a screen shot of the current form. You specify a folder where JD Edwards Autopilot stores the screen shots.
This section discusses how to:
Use the Command Line command.
Create a screen shot of the current form.
To open a program, type the path for the program in the Command Line field. On playback, JD Edwards Autopilot reads the path and opens the program.
To use the Command Line command:
From the Command menu, select the Command Line option.
The command pane displays the unpopulated Command Line list and options.
Select the Command Line option.
Complete the Command Line field.
Type the path to the program that you want to open.
Note. Deactivate the play back while scripting feature if you do not want the program to open while you are writing the script.
Click Insertbutton.
You can set up the path and file extension for any screen shots that you create using the Capture Current JD Edwards Window command. You do so by clicking Tools, selecting Options from the drop-down menu, and then selecting the Directories tab on the Options form.
In the Screen Capture field on the Directories tab, you type the path where JD Edwards Autopilot stores the screen shots of forms. You then select the format in which you want to save the images.
To use the Command Line command to create a screen shot of a form, type a name for the image in the File Name field. JD Edwards Autopilot creates a screen shot of the current form and saves it in the specified format in the specified directory.
To create a screen shot of the current form:
From the Tools menu, select Options.
On the Options form, select the Directories tab.
Complete this field:
Screen Capture
Type the path where you want JD Edwards Autopilot to store the screen shots.
Format
Using the drop-down menu, select the file extension, such as .tif, that you want to use for the screen shots.
Click OK.
With a script open, select Command Line from the Command menu.
Click the Capture Current JD Edwards Window option.
With a JD Edwards EnterpriseOne form active, complete the File Name field.
Click Insert button.
JD Edwards Autopilot stores the screen shot in the specified location.