Jump to content
Server Maintenance This Week. ×

Export Records


This topic is 8546 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have over 3000 records with 10 fields to archive from 2 different layouts, however some of the field names are different. The archive file name is unique for each day and I have written the script to generate the name from various elements of the records. Is there anyway to automatically set up the field export list so that it is correct for the records I am exporting and also automatically allocate the file name and path to the dialog box. Phew, I hope you understand that. I have only been working with filemaker for 3 months here in the UK

Many thanks

Link to comment
Share on other sites

FileMaker pro remembers the last export order (as it does the last find and sort).

Perform the export, the create a script with the export command in it (set to restore export order and no dialog). There, it's saved.

Now do the same for the other export: make a different Script.

Link to comment
Share on other sites

  • Newbies

Thanks Vaughan, Many thanks for your reply.

I asked 2 questions although reading my mail it was not that clear for which I apologise.

The second question concerns the dialog box where you enter the file name and location on the selected drive to store the exported records.

Is there any way to set the filename box and location box automatically from a script?.

I have added a Copy function to my script which copies the filename ok, but the Paste function does not work even though the cursor is blinking in the filename box.

Doing a Ctrl V does put it in, so why not the paste?.

The exported records are always going to be archived in the same location so I was trying to find a way for Filemaker to remember that. There are several users across the network who can archive so I wanted it to be finger proof so that the correct location is always chosen.

Again Many thanks, I,m learning everyday.

Link to comment
Share on other sites

No, file names (and alert messages) are not copy/paste-able, nor can they be based an the contents of a field.

Many people work around this limitation using AppleScript or WinBatch -- save to a temp file, rename the temp file to whatever is needed.

I just reread your question: the file name and location is saved in the script, it's just that it cannot be changed. That is, the script will always save to the same name and location. I've always wanted FMP to save files with date/time appended to the name, but it cannot be done in FMP, outside help is needed in the form of AppleScript or Winbatch.

[This message has been edited by Vaughan (edited November 29, 2000).]

Link to comment
Share on other sites

  • Newbies

Thanks Vaughan,

Below is the script I wrote to set the filename for each day. Then end result is a file name BU121100.00W,(I,m using the English date format dd/mm/yy). The copy function does save it to the clipboard and when the dialog box appears I manually hit Ctrl V and it pastes it automatically into the file name box that appears as a result of the Export Function.

Script:

Insert Current Date[field name1]

Set Field [field name1,NumToText(field name1)]

Set Field [field name2, "BU"&file name1&".00W"]

Set Field [File name2, Substitute(File name2, "20", "")] #This gets rid of the 20 in the year 2000.

Copy[file name2]

Export Records

I don't know if this is a long winded way to do it as as I said I have only been working with filemaker for 3 months.

Many regards

Dave Tolley

Link to comment
Share on other sites

Sure, you can manually copy/paste anything into a save dialog box. But you cannot get a script to do it automatically. And for me, that's the point of scripting, to get stuff done automatically.

Link to comment
Share on other sites

This topic is 8546 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.