To add Scripted data set
- In the Outline panel, right-click on Data Sets sub-node and select New Data Set.
- In the New Data Set window, select the Scripted data source.
-
Select Scripted Data Set as Data Set type.
Update the Data Set Name field, and then click Next.
- In the Output columns, assign the column names for your output values, then click Finish.
-
Add scripts on the Data Set Property.
- Select the Scripted data set in the Outline panel.
-
On the Script tab, select Open from the Script drop down list and input your open data script.
Example
testClass = new Packages.SimpleClass();
test = testClass.readData();
totalrows = test.size();
currentrow = 0;
Note: To enter multiple script lines, separate each syntaxes with semicolon. -
For your output values, select Fetch from the Script drop down list and input fetch data script.
Example
if( currentrow >= totalrows ){return( false );}
var testrow = test.get(currentrow);
var Company = testrow[0];
var User = testrow[1];
row["Company"]=Company;
row["User"]=User;
currentrow = currentrow + 1;
return ( true );
-
Select Close from the Script drop down list and input your script for closing data.
Example
testClass = null;
test = null;