Issue With job.getPath()

Post Reply
kramer5789
Newbie
Posts: 5
Joined: Wed Mar 31, 2021 6:33 am

Issue With job.getPath()

Post 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?
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Issue With job.getPath()

Post 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
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
kramer5789
Newbie
Posts: 5
Joined: Wed Mar 31, 2021 6:33 am

Re: Issue With job.getPath()

Post by kramer5789 »

Thank you!
Post Reply