dbTalk Databases Forums  

Import script step FMP 7 after renaming file.

comp.databases.filemaker comp.databases.filemaker


Discuss Import script step FMP 7 after renaming file. in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Import script step FMP 7 after renaming file. - 10-04-2005 , 02:17 AM






I have an accounting solution where a script imports records from a
table in the same file.

If the file is called myfile.fp7. In the import script step, the file
reference file:myfile.fp7 is stored.

Clients may want to change the file. But if they do, the script will
look for the old file name.

Telling the clients not to change the file name is a no go, it must be
possible to work with several copies of the solution (accounts of more
than one client - my client's clients, that is).

Is there a way to tell Filemaker that the table with the records always
resides in the same file?

I could tell the clients they'll have to change the script if the change
the filename, of course. Or export to a text file and then re-import.
--
http://clk.ch

Reply With Quote
  #2  
Old   
Matt Wills
 
Posts: n/a

Default Re: Import script step FMP 7 after renaming file. - 10-04-2005 , 06:23 AM






Christoph Kaufmann wrote on (10/4/2005):

Quote:
I have an accounting solution where a script imports records from a
table in the same file.

If the file is called myfile.fp7. In the import script step, the file
reference file:myfile.fp7 is stored.

Clients may want to change the file. But if they do, the script will
look for the old file name.

Telling the clients not to change the file name is a no go, it must be
possible to work with several copies of the solution (accounts of more
than one client - my client's clients, that is).

Is there a way to tell Filemaker that the table with the records always
resides in the same file?

I could tell the clients they'll have to change the script if the change
the filename, of course. Or export to a text file and then re-import.
Someone else may have a more elegant snawer, but here's my quick and dirty
test:

Set Error Capture On

Import

If Get ( LastError ) = 100

Open Define File References

Perform Script [ ThisScript ]

End If

Tell your clients they can change the file name, but if they do, they will
see that Define File Reference dialog and how to deal with it. Maybe the
won't bother.

Matt

--



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.