Thank you for visiting the FileMaker Thoughts 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
Feb192013

The FileMaker Get(SortState) Function

From Dwayne Wright PMP, PMI-ACP
Certified FileMaker Developer

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


Get(SortState)
FMP Version: FileMaker 7 And Higher
Returns A Number Result



The Get(SortState) function will return a numeric result corresponding to the fact that a set of records is sorted, semi-sorted or not sorted. Semi-sorted is a condition where a found set of records was sorted but new records have been added. So all but the new records correspond to the last sort order.

If the found set of records is sorted, it will return a 1
If the found set of records is not sorted, it will return a 0
If you see a 2, that means the found set of records is semi-sorted.

Now with FileMaker 10 (and higher), this function is likely used differently than previous versions. This is because FileMaker 10+ will automatically sort found sets of records when new data is added or edited!

Still, the Get(SortState) funtion is a nice feature and one way to key a conditional formatting feature to give the user a visual indication if a found set is sorted or not!

Tuesday
Feb192013

FileMaker Anchor / Buoy Relationships Do Create Redundant TOs

From Dwayne Wright PMP, PMI-ACP
Certified FileMaker Developer

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

The bi-directional feature in FileMaker relationships is a powerful feature and allows you to write tighter code in regards to your relationships. However, it is a feature I have decided to totally do without and so does the true Anchor / Buoy design concept.

Say that you have a relationship between Invoices and Clients so that you can see client information from an invoice record. So you have that relationship setup and now you want to have a portal of related invoices that can be seen from a client record.

In traditional relationship design, you can use the same relationship setting between invoices to clients. In Anchor/Buoy, you have to have two relationships because no two main tables can use the same relationship.

So you can say that Anchor / Buoy is a setup of one way streets and two way streets are not allowed. In light of this one example, Anchor / Buoy design makes almost zero sense. However, if you are talking about a solution with 20 or more highly relationship connected tables, you are going to have so many bidirectional relationships that it is going to be hard to keep them straight.

If you use a relationship design approach other than Anchor / Buoy, you will likely see all possible table occurrences in TO related pick lists because almost everything links to everything. If you use an Anchor/Buoy relationship design approach, this list is filtered because no two base tables touch (again because table occurrences are organized into groups or islands). So you can quickly and effectively choose just the related table occurrences you need and not choose a problematic table occurrence.

So you will have a large number of redundant TOs but if you manage them correctly, they are beneficial from a design and a project management perspective.

Here are some links to other posts that might be of interest in regards to this topic...
Anchor/Buoy, A Closer Look At Its Advantages
So, What Are The Benefits Of Anchor / Buoy
More About Layout Context And Table Occurrences
More About Calculation Context And Table Occurrences
Benefits Anchor / Buoy (the quick list)
Anchor / Buoy Segmentation Makes Better Printing
=
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.

Thursday
Feb142013

Reader Asks: Using The FileMaker Case Function

From Dwayne Wright PMP, PMI-ACP
Certified FileMaker Developer

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

A READER WRITES
While trying to find a solution to a problem I'm having with a FMP file I'm writing, I came across an article by you regarding FMP's CASE function. I am not at a developer, just a regular joe trying to learn and develop a couple of small files, not at all well versed in the intricacies of building a sophisticated DB.
 
Would help me solve my dilemma? I'd be appreciative if you would I've studied and researched and fought endlessly to figure out why my formula won't work. Probably a simple fix but one that is eluding me.

I'm using FMP 9 and trying to incorporate the CASE function as shown below. 


Case(
Number of Days <28 and Number of Guests = 1; 20;
Number of Days <28 and Number of Guests = 2; 35;
Number of Days <28 and Number of Guests = 3; 50;
Number of Days <28 and Number of Guests = 4; 65;
Number of Days <28 and Number of Guests = 5; 80;
0)
+
Case(
Number of Days   ≥ 42  < 56 and Number of Guests = 1; 15;
Number of Days   ≥ 42  < 56 and Number of Guests = 2; 11;
Number of Days   ≥ 42  < 56 and Number of Guests = 3; 9.5;
0)
+
Case(
Number of Days   ≥ 56 and Number of Guests = 1; 10;
Number of Days   ≥ 56 and Number of Guests = 2; 8;
Number of Days   ≥ 56 and Number of Guests = 3; 7;
0)

 
I've attempted to use IF statements but failed there as well.
Most advice on-line is to use the newer CASE function.
 
Can you help me figure this out?
Thank you… either way!

DWAYNE RESPONDS
I am ruthlessly busy and cannot support things like this as much as I like ... but ... I did give it a quick "first cup of coffee" shot at it. Since the "number of guest" part of the puzzle was linear, I tried the "Choose" function. I don't use it that often but I think the enclosed file might work.  Choose is a neat little function that seems a little odd, at first. It first will perform a test and return a number that is equal to or greater than zero. Then it will follow with a number of expressions that will link to that number. I have written about it before ( click here ).
 
Case(
Number Of Days ≥ 56;Choose ( Number Of Guests ; 0; 10; 8; 7 );
Number Of Days ≥ 29; Choose ( Number Of Guests ; 0; 15; 11; 9.5 );
Choose ( Number Of Guests ; 0; 20; 35; 50; 65; 80 ))

Sunday
Feb102013

Commenting FileMaker Scripts

From Dwayne Wright PMP, PMI-ACP
Certified FileMaker Developer

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

The comment script step doesn’t perform an action but is used to add a text note inside of a FileMaker script. This means you can use the Comment step to explain all of the script or perhaps a portion of the overall script.

The ability to document what you have going on in a script may seem like a waste of time, when you are designing the script. However, months or years after the fact, you might find these notes extremely useful. Some describe this as leaving a note for your future self. It can also be an invaluable aid for those databases that may pass from one developer to the next.

HOW TO ADD COMMENTS
To add a comment, you simply choose that script step and then click the Specify button and it will show up on the script. This feature isn’t as robust as most developers would like. It would be great if the comments could be exported in some intelligent way to build a log of your solution scripts.


Here you can see where the comments script step is found.


Here you can see how you add a comment script step


Here you can see an example of a commented script

A GREAT TECHNIQUE
I heard of a really great technique being used by another local Seattle developer called John Sindelar with SeedCode (www.seedcode.com) from the adatasol FileMaker podcast (search for filemaker in iTunes to subscribe).

The idea is to add all your comments first, before you add any of the script steps themselves. This helps you plan your script before you script your plan. After adding the script comments you need, you add all the necessary scripts steps. This can be very useful for two reasons ...

1) If you get pulled away from your database and have to close it, you are much less bewildered when you come back to the script a few minutes, hours or days later.

2) As you add your script comments, you might get inspired for a better way to write your script. This is a time saver because you don’t have any script routines you have to delete or edit yet.

Here you can see some comments in a script.

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

Friday
Feb082013

FileMaker 12 SQL Simple Example With Seven Minute Movie

From Dwayne Wright PMP, PMI-ACP
Certified FileMaker Developer

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

I’ve had a few people ask me about FileMaker 12 SQL information and I’ve sent them links to some of the excellent resources out there. So of those folks have come back to me saying that the information provided there was a bit ... developerish.

So I thought I’d upload a very simple example ( click here to download ) and an equally non-impressive seven minute video tutorial ( click here for link ) to compliment this example. The idea is that perhaps this snack sized information packet helps serve the needs of those folks just wanting to see a glimpse of what this functionality can deliver.

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

Page 1 ... 2 3 4 5 6 ... 135 Next 5 Entries »