Skip to content
+1-888-319-3663

COMMUNITY FORUM

Global variables blank in email

Jim asked 2 years ago
We have two maps where the email notifications are coming through with blank values for the global variables.  Both use standard global variables like GlobalMapID and GlobalRunDate.  All of our other maps that use the same global variables in the email tasks are coming through as expected with valid info.  We’ve removed and recreated the email tasks on the two problem maps, but that didn’t do the trick.
What should I check next?
Answers
Patrick Roth Staff answered 2 years ago
It is always a good idea to put in your version number on cases as lots of times issues are specific to versions.
I suspect your issue is a bug with the built-in global variables in map that was recently fixed in SC 20.18.1.48.
The workaround on your version is to use an ‘after document’ or ‘after map’ (whichever your email tasks are using) script task.
In it, just reference the variables you are having issues with.  This forces SC to evaluate them and they’ll be fine on the email task
TASK_REF_VARIABLES
dim s as string
s = GlobalMapID
s = GlobalRunDate
return true
here we’re just reading those values into a local string variable – won’t don’t really DO anything very interesting.  Just read the value.  But that should solve the issue.
patrick

If you would like to submit an answer or comment, please sign in to the eOne portal.