Where to get the Windows MS SQL Server 2005 driver for FileMaker ESS

Having spent around 30 minutes on Google I know I’m not the only one who had trouble finding the supported Windows ODBC driver for integrating FileMaker Pro v10 and MS SQL Server 2005. FileMaker Inc in their list of supported drivers refer to the Microsoft SQL Native Client 2005.90.3042.00 for use with MS SQL Server 2005 SP2 (9.0.3042) but unfortunately don’t provide a link to download this (or any other Windows drivers). After much searching and downloading you can find the driver here – look for the heading Microsoft SQL Server Native Client.

Hopefully this will help someone avoid the time I wasted trying to find the link to download the driver (which wasn’t already installed on the Windows XP SP3 PC I was working on). Microsoft could also make it a lot easier to find the client drivers – the MySQL drivers are much easier to find by comparison.

Cleaning up Smart Quotes in FileMaker Pro v10

One of my pet hates is the use of “smart quotes” in FileMaker Pro. Smart quotes are the curly quotation marks and curly apostrophes and are usually entered in 2 ways:

1. the setting for smart quotes is enabled by default for the creation of new .fp7 database files on Mac OS X but not for Windows XP, so anytime you enter an apostrophe or a quote mark you will be using smart quotes.

2. pasting in text from Microsoft Word, which also has a preference setting for smart quotes and which is also enabled by default (you can get instructions for how to turn this off on Windows here)

Here are some examples of how they appear:

Single Left Smart Quote: ‘

Single Right Smart Quote: ’

Double Left Smart Quote: “

Double Right Smart Quote: ”

The smart quotes setting in FileMaker Pro can be found by opening a database file and going to the File menu > File Options, and click the Text tab (note that you must log in using the Full Access privilege set to edit items in the Text tab). Here you can toggle smart quotes on and off- if you enable smart quotes when it was previously off this will only affect new typing as any existing data will not be edited automatically.

For many users smart quotes are not problematic, but when it comes to exchanging data with other database platforms (e.g. SQL) and systems (particularly web based systems) their presence will often cause data exchange processes to break or for text not to be displayed correctly, which means you then have to deal with any smart quotes in your data. I was recently working on submitting FileMaker data to on online system and was required to URL encode my data. Everything was working well until one day data was being truncated for no obvious reason. After many tests I realised that some of the apostrophe and quotation characters were not being URL encoded correctly (I was using this handy custom function to URL encode the data before submitting it via HTTP POST). Once I zoomed in on the text to 400% and changed the font to a sans serif font all was clear – the text was using smart quotes which the customer has enabled as this was the default setting for a new .fp7 file on Mac OS X. I quickly turned that off which meant any new data entered directly into the fields would not be using smart quotes, but all the existing data needed to be cleaned up. I created a new custom function RemoveSmartQuotes (text) which uses one of the new functions in FileMaker Pro v10 to reference a character without having to actually type/enter the character into a calculation.

The following calculation uses the Char function to identify any instances of the single and double smart quotes/apostrophes and replace them with plain (straight) quotes and apostrophes:

Substitute (

text ;

[ Char ( 8216 ) ; “‘” ] ; // left smart quote
[ Char ( 8217 ) ; “‘” ] ;  // right smart quote

[ Char ( 8220) ; “\”” ] ; // left double smart quote
[ Char ( 8221) ; “\”” ]   // right double smart quote

 

)

I’ve dcreate a custom function that uses this calculation that you can copy/paste into your file which should appear shortly on Brian Dunning’s custom function site. This custom function can then be used in a number of ways to clean up text that cannot have any smart quotes in them, for example as an auto enter calculation on a field or in a script that transforms data. If you’re using a version of FileMaker Pro before v10 you simply need to change the use of the Char function with the actual smart quotes themselves and remember to escape the double quotes.

Databuzz now FileMaker 10 Certified

We’re pleased to announce that Andrew Duncan recently sat the FileMaker 10 Certification exam and passed!

certified-10-logo_2clr_small

We aim to maintain our certification with each new version of FileMaker that is released. FileMaker Certification lets our customers know that we’re experts in the FileMaker industry and is the only credential sponsored by FileMaker Inc

FileMaker Pro v10 Script Triggers and Pop-up Menus/Drop-down Lists

FileMaker Pro v10 has been out for over 9 months now and in that time developers have come up with a range of new and innovative techniques in the application of Script Triggers to real world problems. One of my favourite uses is to combine a Script Trigger with a field formatted to use a Pop-up Menu or Drop-down list and compare the “before” and “after” value and apply business rules where appropriate. Using a Script Trigger you can capture the “before” value if you pass this as a Script Parameter to the calling script. You can then compare that the new new changed value that you have selected from the menu/list. Due to the timing of the OnObjectModify script trigger a user can change a field using the menu/list – for example changing a Membership Type from “Bronze” to “Silver” – and the script trigger can capture the original value before it is committed from the passed parameter and compare that against the new value stored in the field.

I’ve created a simple sample file that demonstrates this technique that you can download here.

FileMaker Pro 10 – Script Triggers

I’m in the process of updating one of my main solutions that previously used script triggering via the zippScript plugin under FM9 with FM10 native script triggers. zippScript worked really well and was a great all round script triggering plugin but one thing it couldn’t handle was keystroke based script triggers which are native in FM10. For many years I’ve yearned for a way to update a field that counts both the number of characters entered and the number of allowable characters remaining (this is for an SMS solution that has a max of 160 characters in the message field). With FM10 this is now a snap and combined with conditional formatting you can do some nice interface tricks (e.g. make the count field red when it exceeds a limit) and show a dialog when you hit 160 characters etc. I’ve put together a simple demo file for anyone that’s interested at:

http://www.databuzz.com.au/downloads/DB_SMS_Count.zip

I’ll hopefully have some more demo files online shortly.