Sounds like you are on a windows system and are attempting to export the contents of container fields into which objects, not files or pictures, have been inserted.
Unfortunately, inserted objects cannot be exported with this script step.
Hi PhilModJunk, thanks for the response. But no, I'm on a Mac (OS X Version 10.6.8) and the container fields contain pictures (jpegs).
Then export field contents should be able to export the file in the container. If you click on the field and manually select Export Field Contents from the edit menu, does that work?
Can you post the script that you are using?
To post a script to the forum:
- You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
- If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format. (Use the HTML option on the database tab panel and paste the text into the forum's HTML editor.)
Hi again :) Mea Culpa! I was getting the script ready to send when I realised there was an empty container field among the full ones! That's what the script didn't like. Omitted that record and the error message is gone.
Apologies for wasting your time, PhilModJunk, and many thanks for your assistance.
I was just having a similiar problem when a script to export container fields threw the same error even though my path variable worked.
What seemed to fix it for me was going into the Repetition section, which had been autofilled with " ". When I deleted that, it all started working.
I have no idea why.
Ok, same issue here. And yes when I omitted the empty container fields the error message was gone.
Now, my question is. Is there a script step that could bypass this error message so we would not see this even if there was an empty container field? Basically, ignore any empty container fields and just move on to the next record.
You can try
Set Error Capture [on]
But most script errors that come from failing to create a file cannot be suppressed by this script step so try it and see.
If not, either do a find or constrain to omit the record or use the IsEmpty function to avoid trying to export from the field when it is empty.
I added the IsEmpty function in my script and it worked flawlessly. Thank you.