TaskMan substitution keywords

TaskMan supports the following substitution keywords. Before executing a task, TaskMan replaces these keywords with their appropriate values when creating a string made up of the task executable name (defined on the Background Task Definitions form) plus the task parameters (passed from the SyteLine form).
Note: This topic applies to only on-premises environments.

Generally you specify these keywords when defining task parameters for an event on a form.

Some of these keywords are used to get values from TaskMan settings.

Keyword Description
BG~TASKID~ Replaced by the task number from the ActiveBGTasks and BGTaskHistory tables.
BG~TASKNAME~ Replaced by the task name from the BGTaskDefinitions table.
BG~CONFIG~ Replaced by the SyteLine configuration name.
BG~SITEID~ Replaced by the site associated with the current configuration name.
BG~COMPANYNAME~ Replaced by the value of the Company field from the General Parameters form.
BG~REQUSER~ Replaced by the user name requesting the task.
BG~SQLLOGIN~ Login associated with the user ID used to connect to a database.
BG~DSN~ Name of the DSN used by TaskMan to connect to a database.
BG~UID~ User ID used by TaskMan to connect to a database.
BG~SERVER~ Server name used by TaskMan to connect to a database.
BG~DB~ Database name used by TaskMan to connect to a database.
BG~TMHOMEDIR~ Directory where TaskMan.exe and RunReport.exe are installed.
BG~ERRFILE~ When a task completes, TaskMan copies the contents of this file to BGTaskHistory, and then deletes the file.
BG~OUTDIR~ Path to the output directory under the TaskMan home directory. This allows EXEs run through TaskMan to produce output.
BG~ISOLATIONLEVEL~ The SQL Server isolation level used by TaskMan for reports and stored procedures. The return value is UNCOMMITTED or COMMITTED. Values are set in the Isolation Level field on the Background Task Definitions form and the Collection Read Mode field on the Process Defaults form.
BG~FAXNUM~ The telephone number of the fax machine to which the document is to be sent. The keyword is replaced with the number specified in the Destination field on the Customer Document Profile form or the Vendor Document Profile form.
BG~FAXSERVER~ The name of the fax server machine. The keyword applies only to Windows Fax. If BG~FAXSERVER~ is omitted from a fax header or if the Fax Server field on the Intranets form is blank, then the default fax server name at run time is the name of the TaskMan machine. Windows Fax uses a modem on the TaskMan machine.
BG~FAXTOCOMPANY~ The name of the company to which the fax is sent; the name is printed on the fax cover sheet. The keyword is replaced with the name specified in the Cover Sheet Company field on the Customer Document Profile form or the Vendor Document Profile form. The keyword does not apply to Windows Fax or Infor Framework Fax Service.
BG~FAXTONAME~ The name of the individual to whom the fax is sent; the name is printed on the fax cover sheet. The keyword is replaced with the name specified in the Cover Sheet Contact field on the Customer Document Profile form or the Vendor Document Profile form. The keyword does not apply to Windows Fax or Infor Framework Fax Service.
BG~OUTPUTFILE~ The report output file created in the directory \TaskMan_Directory\Report\OutputFiles\user on the TaskMan machine.

TaskMan also supports the following additional keywords used as command line switches. TaskMan deletes these keywords from the task executable and parameter string.

Keyword

Description

BG~LEAVELITS~ SyteLine wraps many literal values in ~LIT~(...). This keyword, which can be specified in an event handler on a form, tells TaskMan to leave these values. For example, you can create an event on a form that runs an EXE through TaskMan. Use this keyword to allow any ~LIT~ keywords in the parameters to be passed through to the EXE.
BG~LEAVETEMPS~ TaskMan normally puts the contents of the BG~ERRFILE~ error file in BGTaskHistory and then deletes the file. This keyword tells TaskMan to leave the error files.