My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
Go to Article
Advanced Search 

ADVISOR TIPS

Fix FileMaker Pro Path Problems

If you ever want to edit a filename to track revisions, for example, this tip will help you avoid the painstaking process of having to locate the file each time to do an import or go through and reset all your scripts.

By Michael Rochard


Because of the single file structure in FileMaker Pro 7 and newer, it's easy to rename a file without having to be concerned with breaking file references and scripts. Although this isn't a normal occurrence, I have one user who insists on adding the version number to the end of the file name. One particular file in the solution has a lot of import routines that constantly had to be reset. For some inexplicable reason, if you change the file name, FileMaker Pro is incapable of remembering that it is importing from one table to another, even in the same file. To avoid the painstaking process of having to locate the file each time to do an import or go through and reset all your scripts, you can use a global variable to get the current file name, then specify the variable as the file from which you're importing.

In my startup script, I add the following line of code:

Set Variable [$$file; get(filename)]

This code gets the name of the current file and stores it in the variable $$file for the duration of the user session, which lets you use it over and over again while you're working. For each scripted import, I start by specifying the actual file and then, after I've saved that import script step, I press the Specify button again, clear out the file reference, and type in $$file. So, no matter what the file name is changed to or how many times it changes, the import will always work correctly without prompting me to locate the file that is being imported.

You could also use a local variable:

Set Variable [$file, get(filename)]

You'd add this script line at the beginning of each import script. Because it's a local variable ($ not $$), it's only stored for the duration of the script itself. This behavior is fine if you only have one or two scripts with imports, but if you're going to perform a lot of imports from different scripts, using the global variable ($$) is much easier.

What do YOU think about this topic? Share your advice and thoughts using this form.

Your Name

REQUIRED : PUBLIC

Your E-Mail

REQUIRED : PRIVATE

Job, Company

OPTIONAL : PUBLIC

City, State, Country

OPTIONAL : PUBLIC

Your Web Site

OPTIONAL : PUBLIC

Your Comment

Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

Michael Rochard was born in England and has been a full time professional FileMaker developer since 1987. He co-founded the first FileMaker-only consultancy in the UK. Michael has worked with many Fortune 500 companies and has developed solutions for virtually every industry. He specializes in highly visual intuitive interfaces. Michael works as a consultant for Excelisys but also has his own company, TimeGain Software, which provides Web site design, graphic design, and business development services in addition to FileMaker development. rochard@timegainsoftware.com or rochard@excelisys.com

Printer-friendly
page layout

Keyword Tags: FileMaker, FileMaker Development, FileMaker FileMaker Pro

ADVISORAMA
Flattery is like perfume; you're supposed to smell it, not swallow it.

ARTICLE INFO

DataBased Advisor

Web Edition: 2007 Week 34, Doc #19133

Print Edition: August/September 2007, Page 45

FREE ACCESS FREE ACCESS

SUBSCRIPTION STATUS
You are not signed-in. If you are a subscriber to this publication, sign-in above to access locked articles. To subscribe or renew go to www.AdvisorStore.com.

Subscribe to DATABASED.ADVISOR.com

Get it all -- every current and past ADVISOR tech/business publication, now all-in-one subscription, with new articles and a huge reference library packed with expert advice, how-to and downloads. Subscribe now to get it all.

DataBased.Advisor.com

Subscribe to FileMaker Advisor Magazine

Read the advanced guide to creating custom business database solutions with FileMaker software. Subscribe now to gain access to all the archives and downloads.

FileMaker.Advisor.com

Subscribe to Advisor Basics of FileMaker Pro

Learn the fundamentals of using FileMaker Pro software. Every issue gives you step-by-step instructions on creating the databases you need. Subscribe now!

FileMaker.AdvisorBasics.com

Showcase Your Smarts

Submit your tips, techniques and advice and let Advisor promote your business and build your career. Show the world what you know!

AdvisorTips.com

Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
Portions copyright ©1983-2008 Advisor Media, Inc. All Rights Reserved.
Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, Inc. in the United States and/or other countries.
Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
Hosted by Prominic.NET Website powered by
LOTUS SOFTWARE
osboj34-06 posted 08/20/2007 modified 01/09/2009 03:35:25 AM ztdbms/ztdbms
domino-144.advisor.com my.advisor.com 01/09/2009 02:06:10 PM