Page 1 of 1

Issue With job.getPath()

Posted: Thu Apr 01, 2021 6:40 am
by kramer5789
Hello,

I am having a weird issue where I cannot get job.getPath() to work and am getting undefined in the result.

https://www.enfocus.com/Manuals/UserGui ... class.html

Code: Select all


async function jobArrived(s, flowElement, job){

	let column1 = await flowElement.getPropertyStringValue("Column1");
	let value1 = await flowElement.getPropertyStringValue("Value1");
	
	await job.log(LogLevel.Info, "Column1");
	await job.log(LogLevel.Info, column1);
	await job.log(LogLevel.Info, "Value1");
	await job.log(LogLevel.Info, value1);
	
	let fileName = await job.getName(includeExtension=false);
	let jobPath = await job.getPath();
	
job.getName works but job.getPath throws an "undefined is not a function"

Does anyone know what I am doing wrong here?

Re: Issue With job.getPath()

Posted: Thu Apr 01, 2021 7:49 am
by jan_suhr
You don't have any job.getPath() function in Node.js for Switch.

BTW the manual you link to is a really old one from Switch 11 and for the old Legacy scripting.

Try this one which have an example on how to get the job path.
https://www.enfocus.com/manuals/Develop ... ntent.html

Re: Issue With job.getPath()

Posted: Fri Apr 02, 2021 2:38 am
by kramer5789
Thank you!