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!


Monday
Mar212011

New FileMaker Windows Acting Like UI Dialog Boxes

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

There are times that the workflow of your FileMaker solution could benefit from a robust pop up message box for data entry. Say you are looking at an invoice that has multiple payments applied to it. You want a new data entry area to “pop up” when the user wants to apply another payment to the invoice. This way you can quickly capture all the payment options without having the user leave the primary invoice screen.

FileMaker provides something like this in the Show Custom Dialog box but it does not have a very robust feature set. What if you want options like pick menus and multiple buttons that interact with this information box?

The answer, for many a developer, is a layout designed to look like a dialogue box that comes up in a new foreground window. The user can do their data entry, make selections or any number of other tasks in that new window. When the user clicks a submit button (that you added to the layout), a script saves the data, performs what ever other actions you decided to include and closes the new window.

There are some variations on this in which a developer may keep the user in a paused script while the new window is open. This way, the user has to deal with the new window first, before clicking around in other options.


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

 

ABOUT THE NEW WINDOW COMMAND
For way too many years, FileMaker developers had to struggle with a one window per FileMaker file limitation. With the introduction of FileMaker 7, that is no longer the case and the options available to the inventive FileMaker developer are both wide and deep. So you can bring up an almost unlimited number of windows that show a layout in different views, sizes and locations on the computer screen. Like so many great features in FileMaker, you can activate the New Window feature in many ways including a menu command, a script step or a button action.  

There are some variations on this in which a developer may keep the user in a paused script while the new window is open. This way, the user has to deal with the new window first, before clicking around in other options

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

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



Sunday
Mar132011

Creating A Popular FileMaker Crosstab Report

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

I do want to stress this isn’t the only way to create such a report but a very popular one and one that is so basic a developer of any level can implement.

One of the most popular crosstab reports is the one that shows accounts receivable broken down into ranges between the current date and the original date due. So we want the report to list each client that has one of more invoices with payment needed and we want to see it categorized by 0-30 days, 30 + days, 60 + days and 90 + days. So you can see the dollar amount for a client across the board.

For this example, I created calculation fields that determine if a value is needed for the 0-30 days, 30 + days, 60 + days and 90 + day options. After that, I create similar summary fields for each. So we have 8 new fields when this is done.

So on the main layout, you can see just the basic invoice fields I need to show of the aging report. You can experiment in changing the invoice date and see the different aging calculations update.

Here you can see the basic layout.

Now we have our report that we run. Any of you that have seen my reports are familiar with the style. This is because I usually copy the script steps from an existing report (a FileMaker Advanced feature), paste it for my new script and tweak it as necessary. So this script ...

- opens up in new window
- finds invoices with a balance due
- runs an error sub routine if no records are found
- goes to the report layout and sorts the records
- adjusts the window to fit the needs of the report

An example file can be downloaded by clicking (here) and there is a related movie on this topic! CLICK HERE!

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

 



Saturday
Mar122011

A FileMaker Secondary Password Using Show Custom Dialog

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

This was a pre FileMaker 7 example I created and is a neat little example file ( if I say so myself ) that uses the Show Custom Dialog box script step to check and see if a user has the secondary password to perform an operation. Call it a double secret authentication for a user, if you will.


ABOUT THE SHOW CUSTOM DIALOG BOX SCRIPT STEP
The Show Custom Dialog box script step has features such as ...

- the ability to show a customized title and message
- the ability to add data into three possible fields
- the ability to include three buttons that branch a script accordingly.

Other  features  include  the  ability  to  use  literal  text  or  a  calculation  to  show  the  dialog  box  title,  the  dialog  box  main  message  and  the  labels  for  the  input  fields.  The fields that you use for data entry do not have to be on the current layout and field validation you have setup for the selected fields will still take place. The same is true for any access privilege settings you might have for those fields, although those settings can be overridden using that check box option in the script itself. If you use global fields for data entry in the Custom Dialog Box, you might want to clear them of data at the start or end of the script. Otherwise, they may contain the data the user had included in a previous execution of this script in the same session.

BACK TO OUR EXAMPLE
I made sure the password is in the exact same case. That is to say the script will know the difference between upper and lower case letters. Also, it has the ability to detect that you entered in the password correctly ... but your caps lock key is on ... making the password in all upper case ... making the password fail.

The file itself is very simple, we have a button called Test Custom Dialog Password. We also show you the actual password ( normally you wouldn’t do this ). We setup the default password to be FileMaker. Click the button and type FileMaker in and see the ok message. Now do the same with the Cap Lock key on and see the error message. No do the same but type in something other than FileMaker and see the error message.

Our script is a three layered branching statement. First it looks to see if the text entered into the custom dialog is an exact match by using the Exact text function. If they are the same, FileMaker approves the password and the script is done.

If the entered data and password are NOT a match, then we check to see if the passwords are equal and the Caps Lock key is on. We can detect the use of the CAPS LOCK key by using the Get(ActiveModifierKeys) function. We can then hint to the user that the Caps Lock key might be the problem. This could be something you did not want to do, depending on how you have setup the security of your databases. I’m just showing you the technique of what can be done.

Last but not least ... if the other two tests are not TRUE, we know the user has an incorrect password.

An example file can be downloaded by clicking (here)
=
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.



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.