Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to open multiple Excel spreadsheets in Filemaker Pro 10

Posted on 2013-02-05
10
Medium Priority
?
530 Views
Last Modified: 2013-08-23
I have a database that has a field which contains the file path to an associated excel spreadsheet for that record. In a find set, how would I open all of the associated Excel spreadsheets for those records. I am using Filemaker Pro 10 for Windows. I tried using the Send Event "open document/application" command in a script but it only opens the spreadsheet of the currently selected record, not all of the records in the find set. I would also like to be able to open other types of files (Word docs, PDF's etc.)
0
Comment
Question by:JohnnyObbq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 25

Expert Comment

by:Will Loving
ID: 38857537
You would simply need to add a "Loop/End Loop" to the script, like this:

Go To Record [ First ]
Loop
   Set Variable [ $FilePath ; Table::FilePathFieldName ]
   Send Event [ "Microsoft Excel.app" ; "misc" ; "dosc" ; "$FilePath" ]
   Go To Record [ Next ; Exit After Last ]
End Loop
0
 

Author Comment

by:JohnnyObbq
ID: 38857682
Is there a way to limit the number of records opening, if somebody accidentally ran the script with all records found it could cause a big problem if say 100 records were avalable.
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 38857746
Yes. Add a variable called $Counter and set it $Counter + 1. The add an Exit Loop [ ] step with the max number of docs to open.

Go To Record [ First ]
Loop
   Exit Loop [ $Counter >= 11 ]
   $Counter [ Value: $Counter + 1 ]
   Set Variable [ $FilePath ; Table::FilePathFieldName ]
   Send Event [ "Microsoft Excel.app" ; "misc" ; "dosc" ; "$FilePath" ]
   Go To Record [ Next ; Exit After Last ]
End Loop
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:JohnnyObbq
ID: 38861698
If I wanted to do something similar with different types of files I have a question. Currently with the script, it is using whatever the Windows default program is for the particular file extension. If I wanted to use a different program than the Windows default, how would I accomplish that.
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 38861858
I believe the Send Event configuration lets you select the application you wish to use to open the file with. If your Send Event script step currently says "unknown" then I assume it will use the default. Instead specifically select the application you wish to use by clicking "Specify Application". This is a Mac screen shot below but it should be the same layout for the dialog.

In this screen shot, I'm specifying that a PDF be opened in "Adobe Acrobat Pro" rather than the default "Preview" or "Adobe Reader".

Send Event Dialog
0
 

Author Comment

by:JohnnyObbq
ID: 38865375
In the windows Filemaker Pro 10 version there is not a "Specify Application" selection

Send Event Dialog
0
 
LVL 25

Accepted Solution

by:
Will Loving earned 1500 total points
ID: 38865559
In Windows, you have to specify it explicitly in the calculation. See the following FileMaker Knowledgebase article: http://www.filemaker.com/11help/html/scripts_ref2.37.69.html

----------------------------

To launch the Notepad application, select the open document/application message, click File, and specify notepad.exe. The following script step appears in the Script Definition dialog box:

Send Event ["aevt"; "odoc"; "NOTEPAD.EXE"]

To open a document created by another application, select the open document/application message, click File, and specify the file (for example image.bmp). The following script step appears in the Script Definition dialog box:

Send Event ["aevt"; "odoc"; "image.bmp"]
0
 

Author Comment

by:JohnnyObbq
ID: 38865885
If I am understanding it properly, how would I be able to specify both actions as in my script one is specifying  a File and the other one is specifying a Calculation, you can't select both.
0
 

Author Comment

by:JohnnyObbq
ID: 38869432
This is what the script looks like:

Applicatio Launch Script
0
 
LVL 2

Expert Comment

by:ozbigben
ID: 38870489
Define the file path in the calculation.  If you have different conditions for using each, then set these up with if/case statements within the calculation, possibly passing extra info for the condition as a script parameter. Alternatively you may want to have the conditional statement as part of the script, using a different event for specific file types and a generic open document event for everything else.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question