Search Project Mgmt
Search FileMaker Blogs

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!


Wednesday
Mar092011

Making FileMaker Buttons Perform Diverse Functions

From Dwayne Wright PMP
Certified FileMaker Developer

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

Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit. For the best experience, please visit the journal directly by clicking (here). 

You may have a button on your FileMaker screen that performs a hidden operation, such as delete this record, go to an otherwise hidden place or perform a script. For example, you could make the “New Record” button delete the current record if the user holds down the shift key. This is done by using a script that branches based upon what it sees via the Get ( ActiveModifierKeys ) function.

If [ Get ( ActiveModifierKeys ) = 1]
Delete Record
Else
Create New Record
End If

The Get ( ActiveModifierKeys ) function itself will return a number result depending on which combination of a particular family of keyboard keys that are held down at the moment. If more than one key is held down, the function results the sum value of each key. The individual values for each key is Shift = 1, Caps Lock = 2, Ctrl (Windows) and Control (Mac OS) = 4, Alt (Windows) and Option (Mac OS) = 8 and Command (Mac OS) = 16. If a user was holding down the shift and the Ctrl keys, the function would return 5. This is the sum of the two key ( Shift = 1 ) + ( Ctrl = 4).

Here is another example that I used this last weekend. Last year, I scanned all the photo from all my photo albums in a effort to get them all online. My scanner allows me to put multiple images on the scanner bed and then creates a file for each indivual picture. Trouble is the files have names such as sc000a0b32.jpg, so I started building a FileMaker Asset Management system. I piled all these scans, scans from years ago, pictures sent to me and digital photos taken.

I then looked at the photos in list view and need to add the metadata I want to them manually. One thing I do is selectively omit records from a found set before I use the replace command to add my metadata to the records in a batch. I had isolated 600 pictures that had myself as the primary person in the picture. I only wanted a found set of those before I went into junior high. So here is the script that I attached to a button that would allow me to omit one record or all the pictures I could see in a viewer (5) via the same button.

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

© 2010 - Dwayne Wright - dwaynewright.com



Sunday
Mar062011

FileMaker Find Symbols / Search Operators

From Dwayne Wright PMP
Certified FileMaker Developer

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

Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit. For the best experience, please visit the journal directly by clicking (here). 

When you do a traditional find operation in FileMaker, you simply go into find mode, type what you are looking for in the appropriate fields and perform the find. You have the ability to adjust what you are looking for with the Find Symbols (often called Search Operators). The idea is that you would place a certain character(s) in front of your search settings and your search results are modified. For example, a search of 18 in an age field for a members database could find all the members that age. A search of < 18, would find everyone less than 18. The less than symbol is being used as a search operator. You have the ability to type in a search operator or you can select them from a pop-up menu inside of the status area.

Some of the symbols / operators you can use are ...

The specifics about each search operator would be ...

< Less Than
Finds all the records that are less than what you specified.

≤ Less Than Or Equal
Finds all the records that are less or equal to a value that you specified.

> Greater Than
Finds all the records that are greater than what you specified.

≥ Greater Than Or Equal
Finds all the records that are greater than or equal to a value that you specified.

= Exact Match
Searches for each full word match for each word specified. Without the operator, a search for Bob would return records of Bob Jones, Bob Williams and Billy Bobbett. If you did a search using the exact operator ( = Bob ) then your search would return Bob Jones and Bob Williams. Billy Bobbett would not be found when using the exact match search operator.

... Range
This is used to find the matching records between two values in a particular field. This is most useful when dealing with numbers, date and time fields. If you were to go into Find Mode and type 10...20 as your find setting and execute the find, you would find the records with values between 10 and 20 ( including 10 and 20 ). For example, you might get records with values of 11, 15 and 20.

! Duplicates
This is used to find records that have exactly matching data within the search field. The found set will have all the duplicates ( original and following matches ). A common use is to find duplicate contact records in an address type of database. This can happen via data entry errors or perhaps a recent import of data. You want to make sure you don’t do a find for duplicates and delete the found set. That would delete the original records as well. There are a number of ways to isolate the original record from the duplicates by using relationships and calculation fields.

// Today’s Date
This is a quick and easy way to find records that have a date value that exactly matches the date in the computers memory.

? Invalid Date or Time
By default, FileMaker does not allow a user to enter in invalid data into a date or time field. FileMaker will bark at you if you try. However, you can enter invalid information into a date or time field with scripts or via imports. So we now know that invalid data is possible in these fields. This invalid data can cause a variety of problems with your database solution. So you can use the ? operator to find any invalid data you might have. Then you can work to correct the problem records.

NOTE: You might have seen the ? character in your date fields right after running a script step that sets a date field to “”. You can fix this by using the set script to set the field equal to TextToDate(“”) and the ? will now appear.

@ One Character
This is used to put a wildcard character into one character space that makes up part of a search setting. For example, a search for Mo@ could return Mom, Moe or Mod. This means any character could take the place of the @ character. However, only one character is all that can be replaced. Records with moon, move or moot would not be found because of the one wild character limitation.

* Zero Or More Characters

This is one of your more “taking a blind stab at it” type of search operators. This will find matches for the wildcard for zero or more characters. So a search for Mo* would return matches such as Mo, Moe, Modern and Moomoo.

“””” Literal Text
The Literal Text Match is a search operator used when you are searching for a literal string of text pieces. Say we have a name field and it contains the following data on four different records ...

LeSaux Media Services
LeSaux Media Services, Inc.
Media Services LeSaux
Services Media LeSaux

A standard search for LeSaux would find all four records. A literal search for LeSaux Media Services would find the records of ...

LeSaux Media Services
LeSaux Media Services, Inc.

~ The Relaxed Search
Well, there is a half hour of my life I’ll never get back. I had a devil of a time researching what this search operator meant and couldn’t find mention of it in any of my books, FileMaker support site, online help or anywhere. Then I remember FileMaker puts a copy of the manual in the English Extra’s folder. Opened it up and did a search there. Then I found out, it is a Japanese only feature (that just seems to appear in the English version of FileMaker). Oh Well!

== Field Content Match
This is used for finding exact matches to what you typed in your search settings. The match will only find the exact same words ( no more or less ) in the exact order you entered them.

NOTE: For case sensitivity when searching for text information, you will need to index the field in ASCII ( see indexing discussion for details ).

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.



Sunday
Mar062011

Extend The FileMaker Found Set

From Dwayne Wright PMP
Certified FileMaker Developer

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

Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit. For the best experience, please visit the journal directly by clicking (here). 

The extend found set allows you to expand your found set of records by performing a find in the omitted set and adding those results to the current found set. So your found set of records grow when an extended find is successful.

It can almost be described as performing two finds and blending the results into one found set. The idea is that you have a found set and after looking at it, you think of some other records you would like to have included. Before extended finds were possible (they were introduced with version 6), you would have to do an entirely new find and expertly craft your single search operation.

So another way to think of extended finds in action is that you initially started with a narrow search and then deciding to cast a larger net to make the found set larger.

To get extended finds to work properly, you first need to start off with a found set of records. Found sets can be created by a previous find, the use of an omit command or after a successful GTRR action. Then go into find mode and enter in the search settings you need to make the found set larger. Then instead of performing the find, perform the Extend Found Set menu option under the Requests menu ( again while in find mode ).
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.



Sunday
Mar062011

Constrain The FileMaker Found Set

From Dwayne Wright PMP
Certified FileMaker Developer

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

Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit. For the best experience, please visit the journal directly by clicking (here). 

With the introduction of FileMaker 6, a new capability was added to constrain or extend the found set. The constrain found set is remarkably similar to what you can do with multiple find requests in the previous versions of FileMaker. For a long time, I had trouble seeing the subtle differences. The more and more I used the constrain found set feature, I began to see those differences and I began to really like these new options. Constrained and extended finds do give the developer more options in scripting the found set process and once you get used to it, you might lean on it all the time.

The way it works is when you are in find mode, a new menu option becomes available. It is called Requests and contains the constrain found set option. You won’t see this option in Browse, Layout or Preview modes. The constrain found set option is like starting with a very wide search. After looking at your resulting found set, you can then use Constrain Found Set to narrow down the results even further.

To get it to work properly, you first need to perform a find, do a GTRR, omit a record or anything that gives you a found set less than the overall record count for the table. Then go back into find mode and enter in search settings to narrow down your found set even further. Then perform the Constrain Found Set menu option under the Requests menu ( again while you are still in find mode ). This will execute the constrained find operation.

Can the Constrain Found Set actions be scripted? Yes, you can script the constrain found set operation. In fact, constrain found set is likely to be activated more by scripts than by user interaction with menu commands.

NOTE: The modify last find feature works a little different when using Constrain
Found Set. It will not restore the find settings that originally created the first found set ( or any of the previous found sets if you run the constrain found set a number of times ). It will only restore the last find settings of the constrain found set. This is something to be aware of in your scripts or in the way some of your users perform their searches!

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

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



Saturday
Feb262011

Printer, PDF, Excel And Other Output Types

From Dwayne Wright PMP
Certified FileMaker Developer

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

Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit. For the best experience, please visit the journal directly by clicking (here). 

In many cases, your other output options will be a PDF or Excel spreadsheet. This is a more eco-friendly way of presenting the data and it has some valid productivity advantages as well. In fact, reporting routines that output into computer documents can be automated! So the reports are done after traditional business hours and are waiting, first thing in the morning, for their audience when they come into the office.

Way back in the 1990s, I was working for Apple Computer and I was the "go to" FileMaker database guy for our building. We had two dozen or more FileMaker database solutions that serviced most of the individual workgroups. At one point, I was getting reports of extreme database slowdown, then the problem would simply vanish, before I could pin down the issue. It turned out that the problem would often be that managers would be running the same intensive reports at the very same time of the day in order to prepare for a meeting with some corporate big shot. As a test, I ended up archiving reports on a managers server in both PDF and Excel format. The pdf copies were better suited for printing or emailing and the excel versions were better for raw material for their own reports. The managers absolutely went nuts about this small process and I was even nominated for a productivity award (for something so rudimentary simple to do).

HOW TO CREATE A PDF REPORT
Save Records As PDF (portable document format) is available as a menu command (from under the File menu) and is also available as a script step. Each option allows you to create a PDF document based upon a FileMaker record or found set of records. The Save Records As PDF script step has some interesting options such as appending to an existing pdf, automatically opening the newly created file or auto creating an outgoing email (with a compatible email client) and have the file attached as an email enclosure.

REPORTS THAT NEED TO BE EXPORTED
There are times in which the reporting values that you are working with need to be exported, so they can be incorporated into a different application. For example, you might want to export the monthly sales activity so that it can be imported into an Excel spreadsheet or perhaps an application specializing in generating professional looking charts. Exporting routines can often be a manual process, because it allows for more "spur of the moment" flexibility. Standard exports can be written into scripted processes and then the developer will often assign the action to a button or custom menu option.

E-MAILING THE REPORT
This can be done in two main ways, the first is to print the report to a pdf document and then send the pdf document as an enclosure. Using ScriptMaker, you can add email pdf report features to your reports as part of the report generating script. The other method is to put the report data in your email as text. This is more time intensive to setup but can get you around any potential enclosure issues. It can also be nice for very quick summary reports that have only a few lines of values.

ARCHIVING REPORTS IN A DATABASE
An interesting twist is that you can store report documents in FileMaker container fields or you can simply store a reference to where the report files are located. If you are going to store references in a container field, I would recommend using the same network volume for all references. Working with references has its advantages but it may require some detailed scripting or education to your end users about the process. To help matters along, you can put in some error checking in this process to help keep all your references straight.

So having your FileMaker productivity reports stored within another FileMaker database is pretty neat. Now container fields themselves do NOT have labels about the data they contain. You cannot do a find and you cannot sort based upon the data within the container field itself. One way around this is to create an additional text field that describes what is in the container field and use that description field for finding and sorting needs.
=
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.