Job group

These variables are Switch-specific. The third column indicates the scripting API function that returns the variable's dynamic value.

Variable name

Data type

Scripting API equivalent

Job.ByteCount

Integer

Job.getByteCount()

Job.EmailAddress

Text Indexed

Job.getEmailAddresses()

Job.Extension

Text

Job.getExtension()

Job.FileCount

Integer

Job.getFileCount()

Job.Hierarchy

Text Indexed

Job.getHierarchyPath()

Job.IsFile

Boolean

Job.isFile()

Job.IsFolder

Boolean

Job.isFolder()

Job.JobState

Text

Job.getJobState()

Job.Name

Text

Job.getName()

Job.NameProper

Text

Job.getNameProper()

Job.Path

Text

Job.getPath()

Job.Priority

Integer

Job.getPriority()

Job.PrivateData

Text

Job.getPrivateData()

Job.Size

Text

--

Job.UniqueNamePrefix

Text

Job.getUniqueNamePrefix()

Job.UserEmail

Text

The user's email address associated with the job (as entered in the Users pane). If no user information has been linked to the job, the variable remains empty.

Job.getUserEmail()

Job.UserFullName

Text

The user's full name associated with the job (as entered in the Users pane). If no user information has been linked to the job, the variable remains empty.

Job.getUserFullName()

Job.UserName

Text

Job.getUserName()

Job.FileCreationDate

Date

The creation date/time of the job file or folder as taken from file system

File(job.getPath()).created

Job.EmailBody

Text

The email body text in the email info associated with the job

Job.getEmailBody()

Job.NestedName

Indent=" "

Text Indexed

A list of indented names (including extension) for all files and folders in the job; by default each level indents with 4 spaces; on a particular level names are sorted alphabetically; see example below

The Indent argument specifies the string added for each indentation level (default value is 4 spaces)

Script that recursively iterates over job contents

Nested name example:

The variable [Job.NestedName:Prefix="-> ",Indent=". "] might be replaced by the following lines:

-> My job folder 
-> . First.pdf 
-> . Second.pdf 
-> . Subfolder 
-> . . Readme.txt 
-> . Third.pdf

The following variables access a job's occurrence trail to provide information on the job's origin and on why the job was sent to the problem jobs folder. Each of the variables access the most recent occurrence of a particular type, as listed in the table.

Variable name

Data type

Most recent occurrence of type

Scripting API equivalent

Job.FailElement

Text

Failed

Occurrence.getElement()

Job.FailFlow

Text

Failed

Occurrence.getFlow()

Job.FailMessage

Text

Failed

Occurrence.getLocalizedMessage()

Job.FailModule

Text

Failed

Occurrence.getModule()

Job.FailTime

Date

Failed

Occurrence.getTimeStamp()

Job.Origin

Text

Produced

Occurrence.getOrigin()

Job.Origin

Use this variable to get the original location of the job before it was injected or submitted into the flow:
  • For a Submit point, this is the original file path of the job submitted to Switch via legacy version of SwitchClient or the path to backing folder of the Submit point if the job has been submitted via the Switch Web Portal.
  • For an FTP receive element, this is the path to the file on FTP server that was used to download the file.
  • For a Mail receive element, this is the ‘From’ address of the email.
  • For a Script element, this is the path that was passed into "createNewJob". Note that the "createNewJob" function can be called with or without a path parameter, so it's up to the script writer to provide the Job.Origin value or to leave it empty.
Note: For other elements, this variable is empty!