When exporting, it seems that by default, files are saved on the desktop. FMP & Tiger.
Otherwise, I set a variable to Value: Get ( desktoppath ) & filename calc & extension
My problem is I cannot get Save to Excel to recognize a variable containing a path/filename.
I am using FMPA 10.0v3 and OSX 10.5.7
I set a variable to the path and filename for the saved file.
$ExportFileName = filemac:/Macintosh HD/Users/dennisj/Desktop/Manifest-13925.xls
Then when I test the script the following happens:
When I set "Output File Path" to $ExportFileName I get an Error 1 and the file is not saved.
When I set "Output File Path" to filemac:/Macintosh HD/Users/dennisj/Desktop/Manifest-13925.xls the file is saved to my desktop.
How do I get the variable to work in the Save to Excel script step.
Try setting $ExportFileName = Get ( DesktopPath ) & "Manifest-13925.xls"
$ExportFileName uses the calculation - Globals Release Notes::g FilePrefix & Get ( DesktopPath ) & "Manifest-" & Manifest::Manifiest ID & ".xls"
Where g FilePrefix is either filemac: or filewin: depending on the platform.
I don't use anything to determine the file prefix, as that is included in the 'Get ( DesktopPath )'. That's probably why it's failing for you.
Thank you for your posts.
You may just want to consider "file:" instead of "filemac:" or "filewin:". For example:
Set Variable [ $path ; "file:" & Get ( DesktopPath ) & "Manifest-13925.xls"
Export Records [
I just tried this with a sample file on both Mac and Windows, and it saved a Manifest-13925.xls to the desktops of both computers.
Let me know if you continue to have difficulty.
Thanks TSGal - you pointed me at my problem - PROBLEM IS NOW SOLVED.
I was using Set Field () to set a global variable.
I should have been using Set Variable () to set a local variable.
Making the change made all the problems go away.