dbTalk Databases Forums  

Default name and dialog title when saving as Excel/PDF

comp.databases.filemaker comp.databases.filemaker


Discuss Default name and dialog title when saving as Excel/PDF in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thomas Hansen
 
Posts: n/a

Default Default name and dialog title when saving as Excel/PDF - 11-24-2005 , 04:31 PM






I have a couple of scripts that save records in Excel or PDF format. In
all of these scripts, I let the user decide where to save the file - and
name it. But is it possible to change the default file name to something
other than "Untitled.xls"? I tried entering a file name (withouth path)
in the script, with result that Filemaker didn't display the file
chooser dialog at all, it simply saved an Excel file with the name I had
chosen in the app folder.

The other thing I would like to do is to change the title of the file
chooser dialog. It now says simply "Save Records as Excel" (or something
like that). Can this be altered in some way?

If none of these two things can be altered, then the user has no way of
actually knowing what records are being saved (if running a script in
which multiple files are saved) unless I update the background window
with some information.

I'm running FileMaker Pro 8 (not Advanced) on Mac OS X 10.4. (The
database itself is running on a FileMaker 8 Server on Mac OS X Server
10.4.)

--
Thomas Hansen : th(at)ambolt.no : http://www.ambolt.no/

Reply With Quote
  #2  
Old   
Michael Paine
 
Posts: n/a

Default Re: Default name and dialog title when saving as Excel/PDF - 11-24-2005 , 06:00 PM






I need to do the same so have done some experiments with Scriptmaker,
based on previous tips from this forum. First I created a global text
field called "filename" (this is needed because there does not seem to
be a way to "input" global variables like the $export that I use below).
Then I created the following script:
-------
export2excel

Show Custom Dialog [ Buttons: “OK”, “Cancel”; Input #1:
Vehicles::filename, "File name for saving (without XLS suffix):" ]
Set Variable [ $export; Value:"file:ancap_fm/REPORTS/" &
Vehicles::filename & ".xls" ]
Save Records as Excel [ File Name: “$export”; Records being browsed; Use
field names as column names ]
[ Restore ]
------------------
This asks the user for a filename, with a default of the current
filename field contents (You can use Set Field name to assign a default
value to the filename field). It uses the response to create a string
global variable ($export) that is used in the Save Records as Excel
command. This avoids the Save As window appearing.


As usual, there are probably a dozen other ways to do this...
Michael Paine


Thomas Hansen wrote:
Quote:
I have a couple of scripts that save records in Excel or PDF format. In
all of these scripts, I let the user decide where to save the file - and
name it. But is it possible to change the default file name to something
other than "Untitled.xls"? I tried entering a file name (withouth path)
in the script, with result that Filemaker didn't display the file
chooser dialog at all, it simply saved an Excel file with the name I had
chosen in the app folder.

The other thing I would like to do is to change the title of the file
chooser dialog. It now says simply "Save Records as Excel" (or something
like that). Can this be altered in some way?

If none of these two things can be altered, then the user has no way of
actually knowing what records are being saved (if running a script in
which multiple files are saved) unless I update the background window
with some information.

I'm running FileMaker Pro 8 (not Advanced) on Mac OS X 10.4. (The
database itself is running on a FileMaker 8 Server on Mac OS X Server
10.4.)


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.