I'm just starting to get up to speed with Javascript in Switch. I've noticed that it's possible to get file statistics two different ways:
var jobStats = new FileStatistics(job.getPath());
var pageCount = jobStats.getNumber("NumberOfPages");
or
var pageCount = job.getVariableAsNumber("[Stats.NumberOfPages]");
Is there any meaningful difference between these methods (performance, side-effects, etc.)?
Thanks,
--arne
Switch Variables vs explicit methods
Switch Variables vs explicit methods
If you only need 1 piece of information: no difference. If you need several, it is best to use the FileStatistics class.
Freddy
Freddy