My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
   
SUBSCRIPTION STATUS
If you are a subscriber to this publication, sign-in to access locked articles. To subscribe or renew go to www.AdvisorStore.com.
Go to Article

ADVISOR TIPS

Move Progress Bars in FileMaker Pro with Conditional Formatting

Using conditional formatting lets you divorce the feature from the table schema, allowing the progress bar to work in any table and in any file without modification.

By John Mark Osborne, Database Pros president and owner, and FileMaker Advisor technical editor


Kieren MacMillan sent me a file demonstrating how to create a progress bar using conditional formatting. Traditional techniques involve some type of field combined with a script. Using conditional formatting lets you divorce the feature from the table schema, allowing the progress bar to work in any table and in any file without modification.

Conditional formatting can be applied to text blocks, fields, Web Viewers, and buttons created using the button tool. Out of the four objects that can be used, text blocks and buttons are the best choices for this technique. It doesn't matter which one you use, but I think buttons are a better choice because you don't need any text for the technique to work. You do have to remove the embossing, pen, and fill colors from a button, but only once.

Start by determining how large you want each segment of the progress bar to be. For this example, I'll use a 5-pixel wide and 15-pixel tall button. If you want to go smaller on the button height to create a thinner progress bar, you might have to decrease the font size. Even though no text will be typed into the button, the font size determines the smallest button you can have. With 12-point font size applied to a button, I was only able to make my button a minimum of 14 pixels tall.

When you create your button, don't assign a script to it. Just click the OK button to exit the dialog and don't type any text for the button. Once you have your button the size you'd like each segment, remove the embossing, fill color, and pen color. Use a transparent pen and fill, rather than a fill color, and make it the same as your background since duplicates of the original button will be overlapping. The goal is to make the buttons blend in with the background. Don't lose your button -- it won't display when a script isn't assigned.

Your next step is to assign the conditional formatting to the button. Choose your favorite fill color and enter the formula:

$ProgressBar > 0

You can use a global variable if you like so the progress bar doesn't disappear after the script is finished running. In many situations, I think it works well if the progress bar disappears after it has completed. And, I certainly wouldn't create a global variable unless you really need the completed progress bar to remain on the screen. Global variables clutter up the Data Viewer and memory, and could potentially result in conflicts if the same variable name is used in several scripts.

John OsborneTechnical editor John Mark Osborne is president and owner of Database Pros, offering FileMaker resources on the Internet. He is author of Scriptology, a speaker at FileMaker Developer Conferences and Macworld conferences, and a trainer for the Professional Training series created by FileMaker, Inc. http://www.databasepros.com jmo@filemakerpros.com

Printer-friendly
page layout

Move Progress Bars in FileMaker Pro with Conditional Formatting

No reader comments ... yet.

    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.

    ARTICLE INFO

    Web Edition: 2008 Week 43, Doc #19540

    FREE ACCESS FREE ACCESS

    Keyword Tags: FileMaker, FileMaker Development, FileMaker FileMaker Pro, User Interface

    ADVISORAMA
    A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.

    Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
    Portions copyright ©1983-2010 Advisor Media, LLC. 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, LLC 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
    ztfmfd0810 osboj041-03 posted 2008-10-20 mod 03/21/2010 03:19:55 AM ztfmfd/ztfmfd
    domino-144.advisor.com my.advisor.com 03/21/2010 06:55:49 AM