check the path, ie by debugger or by showing a custom dialog with $filename. I'm on iPad can't test - but isn't it a slash instead of an backslash - and the filename shoukdn't need the slash anyway
btw. the script saves to the temp folder, not desktop
You never set $temp_folder. You need to add a Set Variable script step to do this. Something like this:
Set Variable [ $temp_folder ; Get ( TemporaryPath ) ]
Try removing the Enter Preview Mode step.
same for $job_id..
I would start over with that script, from scratch
- define variables
- get desired records (find, etc)
- set correct state (browse)...
- export to $filepath (with filename)
-> then check for that file
Also remember, if you are inserting a pdf, you need to start the file path with "imagewin:". It won't work if you leave this out.
Thanks - I should have pointed out that I only posted the relevant part of the script - not the whole lot. It has been working succesfully for a couple of months until I had to make a change.
Thanks - can you explain how to add imagewin to the filepath ? And what if you have a Mac ? (The client has a network of both Macs and windows).
erolst - Thanks for your suggestion to get rid of Enter Preview mode. I have put it back in Browse mode as per the script below (which also shows that all variables have been defined) - but I still don't get the file being stored. Any suggestions ?
erolst - Thanks for your suggestion to get rid of Enter Preview mode. I have put it back in Browse mode as per the script below
Well, when I said “get rid of it” I meant it; just like Print, Save Records as PDF doesn't require you to switch to Preview mode; these operations will automatically create their output based on it. So you can optimize your script by avoiding the potentially expensive switching back and fro between P and B mode.
(By the same (or a similar) token, you don't need to Show All Records before performing a Find.)
Now, is the field into which you want to insert actually on the layout?