If [ Not IsEmpty ( Service Details::Auth ) ]
Export Field Contents [Service Details::Auth; "$filepath"]
You can also see what happens if you use:
Set Error capture [on]
just before the export field contents step instead of using the if step as this script step is supposed to suppress all the error dialogs.
Thank you, the first opion works for me. As always I feel very dumb seeing how logical and elegant the solution is.
Set Error capture [on] does not supress this error dialog pop up though.
Should have known better about Set Error Capture. That's a known bug in FileMaker:
For More Information see: Error Capture
This is one of many acknowledged bugs that can be found in the Known Bug List here in the Report an Issue section of the forum.
It can also be downloaded as a database file from: http://www.4shared.com/file/8orL8apk/FMP_Bugs.html
I came accros anther problem here. I have a script attached to a button for users to insert files in the container field.
When this insert script is used on a mac computer the file gets inserted and the export script that you helped me write yesterday finds them and exports them.
When this same script is used on a windows computer the file gets inserted (and can be manualy exported by a user on aanother (mac) computer) but the export script does not "find it".
Any suggestions on why?
How are they inserting the file?
Are they by any chance inserting it as an object? (I think an inserted object may be seen as "empty" by the IsEmpty function).
You may want to try out using the Length function here since an empty container would have a length of 0.
In the insert script Insert File is used. Could that, inadvertently, insert a file as an object from a windows machine only? I can't find anything that would indicate so in the script step specification.
I tried using the Length function but the script holds again than.
Sorry missed that reference to Insert File, I was thinking more in terms of a manual insert where you don't have control over the insertion method.
On my windows xp machine, If I insert a file, Length(containerField) > 0 will be true if the container field is not empty. This works whether or not I use the Store By Reference option.