Formatting In FileMaker Script Comments

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

In one of the adatasol FileMaker podcasts, a script creating mind set was discussed that entailed the idea of adding your script comments first, before your script steps. Comment out everything you want to do in a script first and then fill in the blanks with your actual scripts. The idea is that you are modeling your script a head of time and then you have it automatically documented when you are done.

I’ve been doing a lot of that lately and I might become a pretty big fan of it. Not sure it will be on the level of learning Anchor/Buoy, but it will probably be up there. So a stray thought struck me in the last big script that I did ...

Wouldn’t it be cool if you can have some formatting control over your script comments?

This could be very interesting ideas. Take a peek at what a script could look like if you had some control over the formatting of its comments. This is just a small snapshot of the script that converts a lead record in InBizness SOHO to a client record. Any records that are related to a lead are converted over to the new contact record as well. So the lead history travels to the new client as well.

PREFIXING
In bold text, you can prefix the script comments for a particular section based upon that sections primary focus. In this example, you can quickly identify the sections of the script for Error Checking, Record Creation and Reassigning Related Records.

COLOR CODING
Bold red is an obvious choice for error checking. I could see that quickly becoming a “best practice for formatting script comments. I used blue to be color for creating of records and green for conversion subscripts.
Here you can see how neatly a text formatting tool bar would fit in the Set Comment script step dialog box.
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2008 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.