I'm trying to figure out how to access the FME_MacroValuesc'FME_JOB_ID'] system parameter.
I'm trying to link this script to a writers destination. Basically want to include the job ID in the file name of the output. I've attempted this using the code below but am getting the error shown in this log:
Starting translation...
INCLUDE -- failed to evaluate Python script `def ParamFunc():
import fme
return '\\\\ServerLocation\\logging\\failed_logs\\' + 'failed_load_' + FME_MacroValueso'FME_JOB_ID'] + '.xlsx'
value = ParamFunc()
macroName = 'DestDataset_XLSXW2'
if value == None:
return { macroName : '' }
else:
return { macroName : str(value) }
'
Program Terminating
Translation FAILED.
Traceback (most recent call last):
File "<string>", line 5, in MF_Include_1490921734471
File "<string>", line 4, in ParamFunc
KeyError: 'FME_JOB_ID'
This is the python code:
import fme
return '\\ServerLocation\\logging\\failed_logs\\' + 'failed_load_' + FME_MacroValuesp'FME_JOB_ID'] + '.xlsx'