Search Project Mgmt
Search FileMaker Blogs

Thank you for visiting the FileMaker Calculations Explored blog. I recently moved this content over from my blogger account. Hope you like it! When you get a chance, check out the centralized search feature for all the FileMaker blogs found along the right side panel. It is quite handy!

Tuesday
Apr152008

FILEMAKER: The Parameter

From Dwayne Wright
Certified FileMaker 9 Developer
www.dwaynewright.com
info@dwaynewright.com

The parameter is generally a critical part of a FileMaker function, although there are a handful of FileMaker functions that have no parameter at all. The parameter is the piece of the function that holds information that is later used in the performance of the calculation within the function.

A function is made up of the function name and the parameter enclosed within parentheses such as FunctionName(parameter). A function that has multiple parameters would look something like FunctionName(parameter1; parameter2; parameter3).

A classic example is the Date function, that is shown as ...

Date ( month ; day ; year).

The Date function allows you to take 3 parameters (which can be a field, a calculated value, literal text or a combination thereof) and make a proper date out of them. Your three parameters are for the month, the day and the year. The nice thing about it is that you can add any number to any of the parameters and FileMaker will calculate the correct date. For example adding 2000 days to the day parameter will automatically take into account the odd number of days in a month and even leap years!

More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2010 - Dwayne Wright - dwaynewright.com

Tuesday
Apr152008

FILEMAKER: Improper Uses For Custom Functions

From Dwayne Wright
Certified FileMaker 9 Developer
www.dwaynewright.com
info@dwaynewright.com

*** this is one of my rare soap box rants, so feel free to pass on the task of reading it (grin) ***

The uses for custom functions is growing more and more and developers begin to explore opportunities that even FileMaker Inc. haven’t imagined. In some ways, this is not a good thing but that is the exception and not the rule. With any advanced technique, it is possible that one developer will take an opportunity farther than another developer wants to deal with.

Basically, there is a sect of FileMaker developers out there that have never met an array they didn’t like. Simply put, they like to stockpile as much information as possible in one area and then slice it up as the need warrants. These developer are normally brilliant but that can be a curse (as well as a blessing).

Case in point, I had to walk away from a project recently that had this problem. There is a product out there that uses a massive amount of custom function programming along with script variables. In fact, this trickles down to areas a simple as the title on a button. I am totally against this type of programming because it isn’t manageable for the long haul. It particularly is a problem when you are the third or fourth developer at bat for a solution.

In this situation, one of the tasks was removing a charting button that appeared on four or five layouts. However, the button wasn’t a simple button. It was a repeating calculation field (for the label) and an invisible button graphic on top. Don’t get me started on invisible buttons, that is another thing I simply hate to come across. They are also something that looks like a good idea for the first developer to add and cause nothing but problems with the third or fourth developer has to deal with them when the original developer is unavailable or unwilling to deal with them.

Anyway, the title of the button that I was suppose to remove was the fourth repetition of a six repetition field. You cannot remove a middle repetition and have other repetitions slide to fill their place. In particular if there are calculations that are repetition specific, you might not know how your edit will affect the overall operation of a solution. To make matters worse, the calculation had a different syntax for each repetition, which referred to a custom function, which managed a huge number of tasks from two different global variables set during startup and edited during the execution of the solution.

All of this coding for “just the title” a button that appears on four layouts that runs a script that has a half dozen script steps. Sometimes, going to the store for a quart of milk is just that. You don’t have to toss the experience into an array of your life experiences and then parse that array if you want to go to the store for a quart of orange juice instead.

The term of KISS (keep is simple stupid) doesn’t fit because the coding, standing on its own, is brilliant. It just isn’t modular enough for the blue collar purposes that are always the workhorse purposes of a database core. I tend to think of this as a simple edit of KISSG (keep is simple smart guy/gal).
=
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.

Tuesday
Apr082008

FILEMAKER: Current Examples Of Some Custom Functions I Use

From Dwayne Wright
Certified FileMaker 9 Developer
www.dwaynewright.com
info@dwaynewright.com

This is a listing of the current custom functions that are used within InBizness SOHO. None of these custom functions are original because there is such a wealth of complimentary custom functions out there. I wanted to take a moment to acknowledge these resources, thank the providers for them and point you to where these terrific resources are.


SUPERLOG
from NightWing Enterprises (http://www.nightwing.com.au/FileMaker/) part of the 747 collection
Allows each module to do basic auditing of selected FileMaker data entry fields. Found in almost all form views that are associated with major base tables such as clients, invoices, inventory, etc...

ADDDOLLARFORMAT
from briandunning.com (http://www.briandunning.com/cf/196 ) uploaded by Jeremiah Small of Soliant Consulting
This allows me to take number data and show it in proper dollar format in text strings like the emailing the text version of an invoice. You can see this custom function in fields like EMAIL_invoice in the invoice module or c_email_purchase in the Purchase order module.

CFTAB
from briandunning.com (http://www.briandunning.com/cf/570) uploaded by Michele Olson, AppleSauce Productions, Inc. but she acknowledges it came from the FileMaker 8 Desk Reference (another great resource)
This is used to add a tab character in text strings. You will find this used in the proposal module to indent the estimated hours and costs for project milestones.

CHECKTEXT
I guess I did create this custom function but the code was part of an example file gleaned from databasepros.com (http://www.databasepros.com/resources.html). I think there are a number of others at briandunning.com as well.
This takes a number and converts it into written text and this is used in the printing of checks from the Finance module. I did this back when FileMaker 7 was first introduced and it has been a part of InBizness SOHO since the beginning. I took the code from the example file and built a custom function out of it.

=
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.

Tuesday
Apr012008

The WindowNames Function

From Dwayne Wright PMP - Certified FileMaker Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

WindowNames
No parameter is required but a filename parameter can be used
Introduced With FileMaker 7
Returns A Text Result

The WindowNames function gives you the name of each open FileMaker window. Each window name is listed separated by a carriage return. This function, like the DatabaseNames function, does not need a parameter. In FileMaker, you can have multiple windows open at a time. There are script steps that can open new windows and even give the windows specified names.

Example: At the moment that I'm writing this, I have three FileMaker windows open. I have two windows open for my afa_database and I have another file opened called Functions_7 ( which is an example file). So the function at the moment returned the following...

Functions_7
afa_database
afa_database - 2

Once again, by default, the WindowNames function does not have a parameter but you can certainly add one. You can specify a particular file that you want to capture the names of the windows for. This can be handy because if you have multiple files open, it is possible that the same window name may be used in individual windows.

Many times, when a design function parameter wants a file name, the developer will use the Get(FileName) function to provide the name of the current file. So if I had this function in my afa_database file and used the Get(FileName) function ... WindowNames(Get(FileName)) ... I would see the results of ...

afa_database
afa_database - 2
=
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.

Monday
Mar312008

FILEMAKER: Arrange All Windows Script Step

From Dwayne Wright
Certified FileMaker 9 Developer
www.dwaynewright.com
info@dwaynewright.com

The Arrange All Windows script step is used to arrange all the open FileMaker windows in a manner defined by the script. This script step will not affect windows that are not open at the time the script step executes.

The Arrange All Windows script step as the options of Tile Horizontally, Tile Vertically, Cascade Window and Bring All To Front (Macintosh Only). This matches the options you have from under the Window menu. When the script step is added to a script, the Tile Horizontally option is automatically chosen.

Tile Horizontally - moves the open windows to the left of the screen and resizes the windows so you can see them below each other.

Tile Vertically - moves the open windows to the top of the screen and resizes the windows so you can see them side by side (left to right) of each other.

Cascade Windows - moves the open windows to the left of the screen and then places each window below another in such a way as you can see the title bar of each window. Then you can quickly choose with window you want to work on by clicking its title bar.

Bring All To Front (Macintosh Only) - Used when a FileMaker window might be hidden behind another application, will bring the window into the foreground. For example, many of my legacy FileMaker articles are in Word format. I am rewriting these in FileMaker, having each discussion be its own record. I might have on of my open FileMaker windows behind an open Word document on the screen. This will bring that window to the front of the Word document window.

HOW IT IS USED
I have never seen this script step used, so I am imagining here. If a developer would create a solution that utilized a lot of windows and a script called upon the ability to see all the open windows, then they may use this script step to setup that operation. Normally, any power user that has multiple windows open will use these same options from the Windows menu.

Got To Know Factor - 5

More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2010 - Dwayne Wright - dwaynewright.com

Page 1 ... 4 5 6 7 8 ... 61 Next 5 Entries »