Solved

How to open multiple Excel spreadsheets in Filemaker Pro 10

Posted on 2013-02-05
10
529 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 500 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

630 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