Dec 18, 2009; 12:17
njadams
RE Looping Script to insert file
I managed to get the script working. I went through all the fields
again and removed text formatting. There must have been some
invisibles in the text in one of the fields.
My problem now is that when it gets to a file with a .pages or
a .rtfd file extension that contains images I now get the following
message:
"This file cannot be inserted because it contains other files inside
it."
Is there anyway to get around this other than converting the files to
pdf format?
Nick
> Greetings to all,
>
> I cannot get this script to work.
>
> I Have a table "Document Library" with 767 records.
> I have fields for:
> File Name and extension - text
> Volume - text
> Folder1 - text
> Folder2 - text
> Folder3 - text
> File- Container
> FilePath A calculated field whose result is:
> macfile:/volume/Folder1/Folder2/Folder3/Filename and extension.
> Calculation is not stored.
>
> The data was imported from a tab separated text file.
>
> I want to insert a reference to each file into the container field.
>
> My script is as follows:
> Got to Record/Request/Page [First]
> Loop
> Set Variable [$path; Value:Document Library::File; "FilePath"]
> Insert File [Reference; Document Library::File;"$Path"]
> Go to Record/Request/Page [Next; Exit after last]
> End Loop
>
> When I run the script it gives an error that the file cannot be
> found and is needed to complete this operation. When I locate the
> file it inserts and goes to the next record and the same error
> comes up.
>
> I get the same error if I use the script without the loop just to
> insert one file.
>
> The Document `Library is located in Folder2 which is on a different
> hard drive than where FMP is installed so I tried file:/Folder3/
> Filename and extension. That also doesn't work.
>
> I also removed all formatting in the text fields in case there were
> some invisible characters screwing up the process.
>
> I am using FMP9 Advanced on a PowerMac with Mac OS 10.4.11
>
> It seem like a simple script so I am assuming that there is
> something wrong with my file path but I cannot see the error.
> I've searched the web and could not find an answer.
>
--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/FileMaker/Browse/
Manage your subscription: http://www.ListSearch.com/FileMaker/