Accessing the ADR with Inline Scripts
Inline Scripts are how you access the Apica Data Repository
There is a quickstart help for Inline Script Code included with ZT.
The Inline Scripts page has the complete Prx BASIC Language Reference Manual embedded in it for reference.
Open a session (*.prxdat) via the Project Navigator.
Refresh the Main Menu to get to the Recorded session and click on any URL that you want values from the ADR to populate.
On the Var Handler Column, find the Inline Scripts Row and click on “Add Inline Script” to open the Add Inline Script Dialog
Enter your Inline Script Code.
Test it
Save it as a Template
Load a previous Template
Add it to the Session when satisfied.
View an Inline Script
We opened up the link after URL #49 that we need a few ADR values from a session.
We see that this Inline Script called ‘setTableRowVar” that was set to execute after URL #49 inputs the ADR value of the country to the Var 1, 'team’
countries = team+";Moscow"
setTableRow("100_Sales_Reco
rds", "Country;Region", countries, "ROW")
We can Test or modify this script by clicking “Modify Inline Script”
Test Script with the “Test Script” button
This allows you to test the execution of the inline script. The run time environment like URL Data, Cookies, and the Value of the Input Variables is simulated (initialized) based on the data of the recorded session.
We see that this ‘setTableRowVar’ script is for the Input Var, ‘team’
Set the Test Script parameters
Note we can see where this script executes in the session
If needed, set the user/loop number and of the URL Call is Passed/Failed.
Click the “Execute Script” and wait for the server at 127.0.0.1 returns a result
The Script result will be displayed as well as the Input Var Name value (in this case the countries from the input team and 'Moscow')
Was this helpful?