Monday, June 22, 2009

Vendor Pick Example And Big Honking Movie

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

The inspiration for this example file came from a request for a virtual one on one training session. My client wanted an experience where a database user picks a product for an order line and a new page opens, which lists all suppliers that carry that product. I was up early the day before the session and decided to try and map out some of the ideas we might discuss in our session.

That was about two months ago and the session went great. I started to write up the documentation for the example and then decided to do a quick movie. Unhappy with the movie I created, I decided to split it into two movies. After it was all said and done, I have seven different movies that I tried to string together into one mondo movie.


So the final movie product is over 36 minutes long and can be found at http://www.dwaynewright.com/videos09/VendorPick.mov. If you click the link, it will play the movie within your browser, you can also right click the link and download the movie to your machine.


An example file can be downloaded at ...
http://www.dwaynewright.com/blogfiles09/PickVendor.zip
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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.

ADVERTISEMENT ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html

Sunday, April 26, 2009

FILEMAKER 10: OnObjectModify Script Trigger Explored

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

CHAPTER 17: Script Triggers

The OnObjectModify script trigger will fire when the object it is associated with has its value changed (with a few notable exceptions). The most common firing method will be when a user types into a field or clicks into a value list to make a new selection choice. Fields with value lists attached to them are going to be a popular place for a script trigger. For example, a “No” checkbox selection to a field could easily run a number of background actions to accommodate associated business logic.

Download The Example (click here)
View The Movie (click here)


So if you have a field on a layout with an OnObjectModify script trigger applied, it will fire each time the field is changed ... regardless if that change is committed. So typing each letter will fire the trigger each time, so it isn’t a very good situation for a script containing the Show Custom Dialog script step. Of course, that is exactly what I did in my example file (grin).

The OnObjectModify trigger will also fire during your standard cut, paste or clear field value commands as well as the Insert family of script steps. These script step commands are dependent upon the field be on the current layout. For this reason, many developers use the Set family of script steps such as Set Field, Set Field By Name and Set Next Serial Value. Do these “non-layout dependent” script steps fire an OnObjectModify script trigger? The answer is “No”, they will not and this is something that developers will need to factor into their triggering implementations.

Other “no fire” OnObjectModify trigger situations include field auto entry settings, calculation/summary field changes and drag/drop into fields that were not actively selected. I have to admit that I’m not familiar with FileMaker drag and drop support at the time I’m writing this up. It is something I continue to forget about as I develop in day to day tasks. I’m sure that will change sometime in the future because this feature is simply too cool to ignore for long.

INTERESTING LEFTOVERS
The OnObjectModify trigger is what is called a Post-Event Script Trigger.

You can assign a script trigger to the repeating field and the OnObjectModify will trigger each time you modify that repetitions value.

I would like to revisit my opening sentence. The OnObjectModify script trigger will fire when the object it is associated with has its value changed. In theory, you can have the same field on the same layout multiple times and each could have a different OnObjectModify trigger applied to them. In the real world, this would probably happen with a field appears on multiple tab panels. In the same field / different trigger situation, the layout field that was modified will fire its trigger and its twin fields trigger will NOT fire.

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

© 2009 - 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.

ADVERTISEMENT ==================
MacUSA provides website and FileMaker Pro hosting services. Utilizing the highest performance web and FileMaker servers. We make FileMaker database hosting as simple as possible. Mac USA Technical Support has been voted the best by our customers. FileMaker Server hosting for your FileMaker web hosting needs supporting FileMaker 10 down through version 5. Hosting FileMaker Pro databases for Instant Web Publishing and Custom Web Publishing including PHP, XML, ODBC, and MySQL access. Use Promo Code dw0904S for FREE setup (a $25 value) when signing up for your FileMaker Hosting services. Offer expires 6/30/2009. http://macusa.net

Thursday, April 23, 2009

EXAMPLE: OnObjectEnter Script Trigger Explored

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

CHAPTER 17: Script Triggers

This example has a variety of OnObjectEnter script triggers applied to it and is used to illustrate some of the example situations listed below.

Download The Example (click here)
View The Movie (click here)

Only some of the triggers are set to fire in both browse and find modes. The tab panel trigger only fires when tabbed into from the comments field. Some fields you cannot click into in Find Mode, so although their triggers are set to fire in Find mode, they cannot.

ABOUT OnObjectEnter SCRIPT TRIGGER
The OnObjectEnter script trigger will fire when the layout object it has been applied to becomes active, most likely by a mouse click, keyboard tab action, scripted action or if that field is first in the tab order when a new record or new find request is created.

Field behavior settings can come into play for the OnObjectEnter trigger. With the exception of scripting, the OnObjectEnter trigger would NOT fire if the field has its behavior setup so it cannot be clicked into. A script can still enter into a field regardless of its layout behavior setting. ( more info Field Behavior and Tab Order And Field Behavior Explored ).

Although a field is only placed in a portal row once in layout mode, clicking on or tabbing into the same field in different portal rows in browse mode would execute a trigger for each.

A portal can have a script trigger applied to it (because it is a layout object) and objects within the portal row can have triggers. Say a portal has a trigger and a field in the portal has a trigger. So clicking on a field in a portal the first time would cause a double whammy. First the trigger associated with the portal object would fire and then the OnObjectEnter associated with the field in the portal will fire.

Repeating fields have a similar behavior to portals. You can assign a script trigger to the repeating field and the OnObjectEnter will trigger each time you enter into one of the fields repetitions.

It is important to note how tab panels work in regards with the OnObjectEnter script trigger. Clicking (or the less known space bar activation) of the individual tabs in a tab panel does NOT cause the OnObjectEnter trigger associated with the tab panel to fire. Tabbing into a tab panel would cause the OnObjectEnter trigger to fire but I really don’t know how often users enter a tab panel via the keyboard tab key.

In a previous post, we discussed the difference between pre-triggers and post-triggers. The OnObjectEnter is a post-trigger, meaning that is will fire after the field has been clicked into and not before. (Makes sense, right?)

FYI ... ABOUT THE TABBING INTO A TAB PANEL
You can setup the tab order of a layout to enter into the first (default) tab of a tab object. After that, you can move from tab to tab in the tab object with the left and right arrow keys. Then you can execute the command to go to that tab hitting the spacebar.

An example file can be downloaded at ...
http://www.dwaynewright.com/blogfiles09/OnObjectEnter.zip
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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.

ADVERTISEMENT ==================
MacUSA provides website and FileMaker Pro hosting services. Utilizing the highest performance web and FileMaker servers. We make FileMaker database hosting as simple as possible. Mac USA Technical Support has been voted the best by our customers. FileMaker Server hosting for your FileMaker web hosting needs supporting FileMaker 10 down through version 5. Hosting FileMaker Pro databases for Instant Web Publishing and Custom Web Publishing including PHP, XML, ODBC, and MySQL access. Use Promo Code dw0904S for FREE setup (a $25 value) when signing up for your FileMaker Hosting services. Offer expires 6/30/2009. http://macusa.net

Sunday, April 12, 2009

EXAMPLE: USPS Leased Facilities 2009

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

APPENDIX 5: Snapshot From The Real World

This is a FileMaker database that was built upon the Excel downloads from
http://www.usps.com/foia/readroom/leasedfacilitiesreport.htm .

I had a client that wanted this and thought I’d go ahead and make the FileMaker version of this available. The USPS web site decided to make this data available in 50+ different downloads and no version that combines them. Here is a blurb from the website ...

The Postal Service maintains more than 25,300 leased spaces in its facilities inventory nation wide. Below is the current national listing of leased postal facilities which includes all fifty States and U.S. Territories.

An example file can be downloaded at ...
http://www.dwaynewright.com/blogfiles09/USPS_Facilities2009.zip
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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.

ADVERTISEMENT ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html

Wednesday, March 25, 2009

EXAMPLE: Aggregate Across

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

CHAPTER 12: Aggregate Functions

One twist to aggregate functions I’ve ignored for the longest time, is the ability to aggregate across multiple fields instead of multiple related records. The ideas is that you can define multiple fields as syntax arguments.


In the example here, you can see ...

Sum Across - summarizes the amount and number fields for the first related record.
Sum ( TableB::amount; TableB::qty )

Sum Standard - summarizes the amount field for all the related records.
Sum ( TableB::amount)

Average Across - averages the amount and number fields for the first related record.
Average ( TableB::amount; TableB::qty )

Average Standard - averages the amount field for all the related records.
Average ( TableB::amount)

There are some interesting uses or this variation and perhaps it is time for me to begin embracing this capability in future reporting needs.

An example file can be downloaded at ...
http://www.dwaynewright.com/blogfiles09/AggregateAcross.zip
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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.

ADVERTISEMENT ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html

Monday, March 9, 2009

EXAMPLE: Multiple Table Occurrences

Sometimes illustrating the difference between tables and table occurrences can be challenging. FileMaker provides a graphical interface for defining relationships between tables. When a table appears in this relationship graph area ( in the define database dialog box ), it is referred to as a table occurrence.

It is not uncommon to need to have than one possible relationship between two tables. When you try to add a table twice to the relationship graph, it will ask you for a unique name for that table occurrence.

In this example, we have two tables guys and girls. The idea is that this is a very lame matchmaking database for guys. Through the layout, you can add a new record for a guy and specify an age range and hair color for possible matches. There are 3 scrollable portals on the layout to show the age range matches, the hair color matches and the combination matches.



If you open the define relationship tab, you will see the guy table with only one table occurrence. The girls table has 3 table occurrences and each is named after the relationship going to it from the guys table. You can open up the relationship box for each relationship. The hair color relationship uses the easy to understand equal to comparison. The age range relationship uses a two layer relationship using greater than equal to and less than equal to comparison operators. The age range relationship uses a three layer relationship using greater than equal to and less than equal to comparison operators for the age and then uses the hair color equal to comparison.

An example file can be downloaded at ...
http://www.dwaynewright.com/blogfiles09/matchmaker_to.zip
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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, March 2, 2009

FileMaker 10 Script Triggers And People Pickers

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

I recently was asked to built a people picker using FileMaker 10 script triggers. I want go into too much depth about it here because I produced a 13 minute long video that describes the entire process.

Enjoy!
Dwayne


There is a related movie on this topic! CLICK HERE!

=========================================

An example file can be downloaded at ...
http://www.dwaynewright.com/blogfiles09/ST_EntryPick.zip
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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.

ADVERTISEMENT ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html