Environment.Item("ADTJobDescription") variable not returning expected result

Scherrit (1 post)
April 7, 2009 08:48 AM
Accepted Answer


We have recently upgraded from adTempus 2 to adTempus 3 (version 3.0.4). We make use of vbscripts, but I have seen that the Environment.Item("ADTJobDescription") variable no longer returns only the job name, it now returns the whole job path (the folder path from the jobs folder with the job name). This I have resolved with a bit of manipulation in the vbscript, but it is still a bit of a pain to convert all the scripts.

However, when we use the Environment.Item("ADTJobDescription") variable in a vbscript in a Shared Script, then it seems as if the variable is not returning any data (almost as if it does not know which job it belongs to).

Could anyone please assist ?



Bill Staff (594 posts)
April 7, 2009 11:12 AM
Accepted Answer

In adTempus 1 and 2, job names had to be unique, even for jobs in different groups (folders). In adTempus 3 we changed that so the name just had to be unique within the group. As a result it's no longer possible to identify the job uniquely by just its name, so we changed a lot of places (including the "ADTJobDescription" variable) to include the "path" when showing the job name.

Unfortunately we didn't think about backward-compatibility when we changed this variable. Now that you've brought it up, we're adding two new predefined variables:

  • ADTJobName gives you the job name only, without the group path. This is how ADTJobDescription used to work.
  • ADTFullyQualifiedJobName gives you the group path and job name, the same way that ADTJobDescription does now. It's the same value as ADTJobDescription returns but we added the redundant variable because "FullyQualifiedJobName" is a more accurate description than "JobDescription".
This change will be in adTempus beginning in version 3.0.7.

Regarding the issue with the variable not returning a value when you tried it in a VBScript shared script: if you're testing the script using "Quick Test" from the script editor, variables won't have values assigned, because they only get assigned during job execution. So the only way to fully test a script that uses variables is to run it as part of a job.

Replies are disabled for this topic.