I have several tests measuring the performance of some forms and writing it into a DB
set myDB to (type:"odbc", DSN:"xy", user:"xy", password:"zy") open database myDB put table "anyTable" of myDB into myTable put now into startTime Click something WaitFor 60, something put now minus startTime into entry log "something took" && entry put first word of entry into durationTime put formattedTime("%Y-%m-%d") into myTime set newRow to (Name: "Test", Group: "someGroup", Environment: "bla", ExecutionDateTime: myTime, ExecutionDuration: durationTime, Id: 1) add record newRow to myTable close database myDB
Since I need to run these tests in different releases I’d like to use the ID column of MyTable to store in the release number. I have created a script X with a universal variable where I pass on the release number
universal MyVar Put (20) into List Put List into universal MyVar Put MyVar
How do I use X in set newRow to (…Id:??) of my command without having to put it in each script separately? That is I want to call the script instead of defining a variable in each script.
Thank you in advance