hartmut Posted July 3, 2007 Posted July 3, 2007 I would like to know if there is any way to export a filemaker database from a filemaker database and NAME the new file with the contents of a particular field. Thank You
Vaughan Posted July 3, 2007 Posted July 3, 2007 Data can be exported as a FileMaker file, and if you're using FMP 8.5 the name can be specified using a variable. Note that the exported FMP file is not a copy of the parent database, it's a plain-vanilla FMP file with the barest minimum. To make a copy of the parent file, use the "Save a Copy As..." command, not Export.
hartmut Posted July 3, 2007 Author Posted July 3, 2007 Thank you. I would like to make a copy . If that is the case. Can a save as be automated and the name be named from a field within the file? I would like to name 200 small files. That is why I am asking this. Thanks
Vaughan Posted July 3, 2007 Posted July 3, 2007 No. Well, maybe with AppleScript. Beyond my area of expertise. I'm interested in why you'd like to create multiple copies of the file. Usually, database administrators expend enormous amounts of effort ensuring the database cannot be copied, and that all duplicates are ruthlessly deleted from the network. :o
Søren Dyhr Posted July 3, 2007 Posted July 3, 2007 ...as well as we often have heard accoundants require this, of thier clients. Maybe we should make an efford to prevent such idiosyncrasies? Which actually is more jeopardizing for the data integrity than keeping it in the same table year after year. It is as if they have no idea what a database can provide of subselections of data in sets, and only see or fear data-loss? Perhaps thier attentions should be send in direction of the live backups that actually is going on FMS (p. 5->) http://www.filemaker.com/downloads/pdf/techbrief_fm8_server.pdf --sd
Fenton Posted July 3, 2007 Posted July 3, 2007 Yes, the Save A Copy As script step supports the (now) standard FileMaker file path syntax. So you can set a script Variable to a file path, which can draw the file name from a field, then Save A Copy As with that path. There are several examples around here about using a script variable, also in FileMaker Help. It is much the same as any Export as far as the path goes. But, one wonders, as Vaughan says, why you'd want multiple copies of a FileMaker file. It hints at poor relational design.
hartmut Posted July 3, 2007 Author Posted July 3, 2007 My reason is I have a database for 200 different people and I have each one personalized ( automatically). They are a volunteer force and it is a gift to them. Each one is customized. They are a gift. There is intentional. Thanks I really wish I could find a working example of this even saving to the desktop as the filepath on a mac. Thanks very much
Fenton Posted July 3, 2007 Posted July 3, 2007 This file will copy itself, renaming each to the field Filename, adding ".fp7". It copies them to a folder "FM_Dupes" on your desktop. On Macs it will check and create the folder. Otherwise it is cross-platform. CopyMe.fp7.zip
hartmut Posted July 3, 2007 Author Posted July 3, 2007 Thank you so much. I am wondering about something . Your application very nicely copies the file with different names. I asked for that . In my custom project. I would like to run a script that allows only certain data for each person. for example records that are only in a radius of 20 miles of their zip code. So I would like to run a find for their radius and THEN save the file as that zip code for example. 13454.f7 34567.f7 for examples. They are a found set first in a large database and then named by zip code. automatically. That is more what i am trying to do. I would appreciate your help Thanks
Fenton Posted July 3, 2007 Posted July 3, 2007 My script simply uses the found set. So do a Find for which records you want first. It uses the Filename field for the, well, file name -] But you could just as well use the Zip Code field. Look at the _cFilepath calculation. Where the Filename field is in the calculation you would choose the Zip Code field instead. The rest would remain the same. Pay attention to what things have quotes (text) and what don't (FileMaker fields). I put a lot of it into a Let() statement first, to keep the path construction simpler. If you don't know what a Let() does, look it up in FileMaker Help. I prefer doing file paths this way, creating an unstored calculation for it. This allows me to see it before trying to use it. It is often little things that break a file path, like leaving out a "/", or forgetting the extension. So I like to see it.
Recommended Posts
This topic is 6413 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now