I have a main script which will run a sub script and that sub script will call for information in a data file identified in the main script. I have looked at global settings and have tried a few things but still cannot get the subscript to pull the information from the main script data file. I have tried global patient and global patientdata. the latter will highlight in the variable window.
Main Script reference
global patientdata
set myDB to (file:ResourcePath(“MRTPT.xlsx”), type:“excel”, writeable:“Yes”)
set Patientdata to the records of mydb
Sub script reference to the datasheet on the main script
the patient.unit is a column on the datasheet referred to in MRTPT on the main script.
Sub script reference to the datasheet on the main script
global patientdata
typetext patient.unit, tab
the patient.unit is a column on the datasheet referred to in MRTPT on the main script.