Predefined Variables

The following predefined standard and web service specific variables are available:

Command Variable Type* Description
(all) %inbox% token This is the path specified in the Inbox field on the host General tab.
  %outbox% token This is the path specified in the Outbox field on the host General tab.
  %datetime% dateTime The date and time that the session started.
  %date% date The date that the session started on.
  %time% time The time that the session started at.
  %host% token Name of the current host.
  %mailbox% token Name of the current mailbox.
  %index% Int

Specifies the usage of a daily host index value. Each host's index is reset to 1 at the beginning of each day.  It is incremented by one every time %index% is referenced.

 

The minimum number of digits in the index string is determined by the Minimum Number Of Macro Index Digits setting on the Options > Other tab. See Other system options

PUT %sourcefile% token Source file name.
  %sourcepath% token Path of the source file name.
  %sourcefilebase% token The base portion of the filename (minus the extension) for the source file.
  %sourcefileext% token Just the extension portion of the filename for the source file.
  %sourcefilelength% long The length of the file that is being sent. This is -1 for streams and files where the length cannot be determined.
  %destination% token The value in the destination field for the PUT action command.
  %filedata% base64Binary This is the file data to send. The data will be Base64 encoded. If the file is being sent in blocks (using the Put File In Blocks advanced option), then this holds just a block of data. Otherwise, it holds the entire file or streams worth of data.
  %filecdata% string This is the file data to send as a string. If this variable is specified, file data is converted to a string prior to the method call. This will be encapsulated in the request in <![CDATA[…]]> unless the file already contains CDATA, in which case it will behave like %filedatastring%.
  %filedatastring% string This is the file data to send as a string. If this variable is specified, file data is converted to a string prior to the method call. If the file is sent in blocks, this contains a block of data.
  %blocksize% int This is the size of the block of data in %filedata%, %filecdata%, or %filedatastring% that is being sent.
PUT, GET %blocknumber% int When file data is transferred in blocks, this is the current block number being sent or received. This value is zero based, so the first block being sent or received is 0.
PUT, GET %filecount% int When transferring multiple files, this is the number of files being transferred. For a PUT command, this is the number of files specified in the source field. For a GET command (when used with the -DIR option), this is the number of files returned from the DIR command.
PUT, GET %filenumber% int When transferring multiple files, this is the current file number of the transfer. This number is 1 based, so the first file transferred is 1.
GET, DELETE %directoryfile% ? When used with the -DIR option, the DIR command is expected to return an array of values stored in %directoryfiles%.  This array is enumerated and each item is assigned to the %directoryfile% variable.  The type of the %directoryfile% is the same type of the array returned into the %directoryfiles% variable.
(special) %directoryfiles%   This variable is a special variable that is expected to be assigned as part of a result in the DIR command. If this variable is not assigned prior to a GET or DELETE with the -DIR option, an error will result.

* The type corresponds to an XML schema type.

When available, variables that match the type of a drop-down field will appear as options in the drop down.

Within a session, the return variable of a method can be used as the input to any other method. The return value is stored using the variable that is specified for the method definition. Since a return value can be of any time or an array, each value of the array and complex type is also stored.

Variable names begin and end with % (i.e. %result%).