I am trying to send out an email report in the run script and I want to have the ID number stored as the file name and I know that dataMap argument is able to retrieve that value since it is used in the report. Whenever I try to execute this an error shows up saying that dataMap is not defined.
I am having a similar issue trying to access report parameters inside the Run Script Action of the report scheduler.
How do you access the report parameters inside the script?
You just reference the value in the dataset like
pName = dataMap[‘PlantName’]
Then in the execute and distribute call you can add it in like
“attachmentName”:“Location: " + str(pName) +” Daily Delay Report"
Replace PlantName with whatever your parameter name is.
Note they are case sensitive as well.
That is exactly how I am trying to utilize the function, but I keep getting an error " WARN: Unable to compile script.Traceback (most recent call last): File"",line 16, in NameError: name ‘dataMap’ is not defined
Can you post the script you are using?
The support team figured it out. I had to start my script with an indent on every line in order to use the dataMap.