Keyboard Modifiers & Keys
Because it's so easy to start a database within FileMaker, it's way to easy to gloss over the power features underneath the surface.
I would imagine some developers may never even touch the OnObjectKeystroke and OnLayoutKeystroke events and still make use of a great FileMaker database.
The trick to taking advantage of some of these power features is making them easy to implement.
Who remembers what all the numeric values are for the myriad of Get () functions? You may often have to look things up and this takes time.
On the other hand, having just a few helpful custom functions can make it MUCH more enjoyable to add in new, and useful, features.
This video will help you get started with, or enhance, your use of the above mentioned trigger events.
Comments
Date script fails for European date format
Matt,
I love this date functionality - or I would if it worked for European date formats :)
Any suggestions to make this work regardless of date format in use?
Cheers
The best I can think of is...
The best I can think of is to use Get ( ApplicationLanguage ). But this doesn't mean a FileMaker solution is being used with a locale specific to it's current language.
This would be something controlled by the solution itself.
As mentioned in the video, the one thing you should do is enforce the way the data is saved into the field. You can do that with an auto-enter setting on the field.
-- Matt Petrowsky - ISO FileMaker Magazine Editor
After further testing
I saved the sample file as a clone to force it to have UK formats dd/mm/yyyy and did some comparisons.
I have found a reasonably tidy way to deal with a file having either US or UK date formats as the file setting.
If I set the original (US) file to use system formats this is when problems occur. The date field will show the date in the UK format '03/04/2000' (3 April 2000) however in a script all functions that extract the data from the field return '4/3/2000' always without the leading zeros. Interestingly get(activefieldcontents) returns '4/3/2000' when used in a script but '03/04/2000' when used in the data viewer. I have been unable to find a way of getting '03/04/2000' out of a date field in the US originated file set to use UK system formats.
If I am missing something obvious I would love to be corrected. I could send you back a version of the file cloned in the UK and set to sue system formats so you can see the issue for yourself. I accept that in most cases we know the date format the file was created with and it is indeed the same as the system on which the file will be used. I just don't like the fragility of a file created in one region but used in another.