Dec 18
njadams Looping Script to insert file
Dec 18, 2009; 06:21
njadams
Looping Script to insert file
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.
Thanks for any help I can get.
Nick
--
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/
Dec 18
Bill K Re: Looping Script to insert file
Dec 18, 2009; 07:32
Bill K
Re: Looping Script to insert file
Dec 18
Jimmy Jones Re: Looping Script to insert file
Dec 18, 2009; 09:57
Jimmy Jones
Re: Looping Script to insert file
Dec 18
Jimmy Jones Re: Looping Script to insert file
Dec 18, 2009; 09:57
Jimmy Jones
Re: Looping Script to insert file
Dec 19
njadams Re: Looping Script to insert file
Dec 19, 2009; 03:10
njadams
Re: Looping Script to insert file