Troubleshooting Errors with FileMaker Server Auto Update plug-ins feature

I’ve been spending a lot of time recently deploying solutions that require plug-ins and having FileMaker Server distribute them automatically to clients via it’s nifty Auto Update feature. Inevitably you will encounter issues for some clients when attempting to download the plug-in: permissions issues with the plug-ins on the server, not having the plug-in in the correct location etc. They are usually easy to resolve once you know what the error is.

When you write a script to download a plug-in you end up calling the FMSAUC_UpdatePlugIn function. This is a function of the AutoUpdate plugin (yes you need to use an existing FileMaker plug-in to download a plug-in), which thankfully by default is always installed by FileMaker Pro/Pro Advanced (there are only 3 functions for this plug-in: one checks the version (used to see if the plug-in is installed), another to find the plug-in you’re after on the FileMaker Server computer, and the third to download the plug-in). Assuming you have the plug-in installed in the correct location on your FileMaker Server with the appropriate permissions set (see the FileMaker Server 11 Guide to Updating Plug-ins for the full details) you’ll end up calling the FMSAUC_UpdatePlugIn function to initiate the download of the plug-in. If successful this function will return 0 like a normal successful script step, and if unsuccessful it will return an error number in the range of -6 to 101.

I like to capture the error number and if necessary display that to the user along with a more human readable error description. There are some custom functions that you can use to return the description for the error code. For example you capture the error code into a variable using the Get (LastError) function and then pass that to the custom function which will return the error description. For example using the custom function linked above ErrorToEnglish ( 101 ) returns “Record is missing” and saves you the trouble of looking up the error code in FileMaker’s help. However when using the FMSAUC_UpdatePlugIn function you won’t able to use this as it has it’s own list of error codes which overlap with existing list of FileMaker error codes. For example error 101 means “The function call from the client computer to the computer running FileMaker Server failed. The server computer might be running a previous version of FileMaker Server.” when returned by the FMSAUC_UpdatePlugIn function but could return “Record is missing” from the Go to Record/Request/Page script step.

I ended up creating another custom function that you can call when performing the FMSAUC_UpdatePlugIn function that will return the appropriate description for any errors encountered when attempting to download a FileMaker plug-in from FileMaker Server. Note you could also extend the existing ErrorToEnglish custom function to include a 2nd parameter to indicate whether it is a script step or the FMSAUC_UpdatePlugIn you are capturing the error code for, rather than have separate custom functions.

FileMaker Announces Schedule for FileMaker Developer Conference 2010 in San Diego

FileMaker, Inc. have announced the sessions and workshops schedule for the FileMaker Developer Conference 2010, the largest annual gathering of worldwide FileMaker independent and corporate database developers, trainers and users. This year’s conference will be at the Sheraton San Diego Hotel & Marina, August 15 to 18, 2010.
This year’s conference will feature more than 80 sessions and workshops, the most ever offered, led by recognized FileMaker experts. Key sessions will focus on FileMaker database development best practices and techniques including FileMaker Server configuration, content sharing between FileMaker and Microsoft Office, FileMaker and the Cloud, working with calculations and more. Conference sessions and workshops will also include detailed information about designing databases on a large scale and displaying information through reports.
Databuzz is pleased to announce that Andrew Duncan will be presenting two sessions at this year’s conference. The first session is titled “Integrating SMS/TXT Messaging to Your FileMaker Solution Session” and is part of the Integration/Web stream. In this session attendees will learn how to integrate the ability to send SMS messages directly into your FileMaker solution. The session will cover:
  • what is required to start sending SMS messages from FileMaker Pro – how to use simple FileMaker Pro native technologies to send an SMS (e.g. scripts steps, Script Triggers and Web Viewers)
  • when to consider using external plug-ins instead of native technologies and which plug-ins to use
  • when to consider using a hardware modem and how to configure ESS for this
  • how to receive incoming SMS messages directly into your FileMaker Pro solution
The second session is also part of the Integration/Web stream and is titled  “Building a FileMaker Pro/Custom Web Publishing Solution for Internal and External Users”. Many FileMaker in-house solutions often require limited access by external parties that do not use FileMaker Pro. In this session we will walk you through how to approach the development of a “hybrid” solution that has 2 types of users: in-house staff using FileMaker Pro and external customers/users using Custom Web Publishing. Find out when and how to use the FileMaker API for PHP to give access to external users to your FileMaker solution. Several case studies will demonstrate how these problems have been solved and what lessons we have learned along the way (things I know now that I wish I had known then).

Attendees can save US $200 on the conference price by registering by May 21, 2010. You can get all the details at the DevCon website

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

We’re FileMaker 9 Certified!

Andrew Duncan finally found time to sit for the FileMaker 9 Certification exam today and we’re pleased to announce that he passed with flying colours. 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 9 Certified!

FileMaker DevCon 2008 Post Mortem

It’s been a few weeks now since I returned from the FileMaker 2008 Developer Conference in Phoenix, Arizona. It was a whirlwind trip this time – there and back in 6 days with lots of jetlag and not much sleep, no thanks to Qantas for cancelling my return flight and delaying my departure. I’ve finally settled back in and can report on some of the highlights from the conference and the product showcase. I spent most of my time attending any PHP related sessions and learnt a lot about the power of PHP in conjunction with the FileMaker PHP API. I’m currently working on a project that is an upgrade from a CDML/FileMaker Unlimited 5 database driven site to a FileMaker Server 9/PHP driven site. There’s lots of new stuff to learn and I’m impressed with the capabilities of PHP compared to CDML. I particularly enjoyed Lance Hallberg’s sessions on the PHP API fundamentals and the advanced features.

The two sessions on using the Web Viewer to interact with your FileMaker tables and as a dynamic interface were both well attended. Both highlighted the power of the MBS plugin and the Fusion Reactor plugin – the amazing Fusion Reactor also won the FileMaker Excellence award for Solution of the Year. Congratulations to Craig and the gang at Digital Fusion for their amazing plugin which is one of the most truly innovative plugins to be released in the last few years.

In the product showcase I ended up buying some new tools and upgrades:

BaseElements 2 – Goya have released their update to v2 of their DDR Analysis tool BaseElements. This is almost a must have for the professional FileMaker Developer. I’m still using both Inspector and BaseElements as each have their strengths but spend most of my time with BaseElements. SixFriedRice were demoing an early released of a web hosted service – FM Lumen – which they promise will provide deeper and faster analysis of the FileMaker DDR. I can’t wait to give that one a try.

ClipManager – My FM Butler have released a beta of v3.0 of their handy tool Clip Manager which allows you to store and manipulate the contents of the FileMaker clipboard. It’s also at present one of the only ways to copy custom functions and you can use it to build up a library of fields, scripts, layouts and other elements that you can quickly add to your solutions. v3.0 is also the first release that runs on Windows as well as the Macintosh.

Web Services Plugin – I already have a developer licence for the amazing Web Services plugin from FM Nexus. This was featured in the opening keynote and FM Nexus released a beta of v2 which makes it easier to load functions on the fly by storing the WSDL file inside a field in your database.

I also bought the VTC PHP Training CD so I can totally immerse myself in the FileMaker API for PHP. I look forward to attending the next DevCon in 2009 in San Francisco – finally a new city and new new hotel!

Beta of FTPit Pro 2.0 released

FTPit Pro 2.0.0b1 has recently been released by the fine folks at CNS Plug-ins. I’ve been eagerly waiting for the “Pro” version of FTPit for quite a while now. I am a big fan of the SMTPit Pro and Pop3it Pro plugins for sending and receiving email from a FileMaker database respectively. You can download the beta of the FTPit Pro, which if you haven’t used it before allows you to upload/download files from/to FTP servers from your FileMaker databsae, from:

http://jake.cnsplug-ins.com/index.htm?id=wR3t3EMb

FileMaker 9 Certification

FileMaker Inc have just announced that the certification test for FileMaker 9 is now available. I plan on attaining certification for FileMaker 9 as soon as possible to complement my certification in v8. I have my copy of the FileMaker Training Series which I will review before sitting for the test. Hopefully I can announce that I passed the test in the next few weeks!

Welcome to the Databuzz Blog!

Well this is my first post to my new blog. I’m using the WordPress blog software and it took just under 1 hour to install and setup and I’m pretty impressed. Once my website is up and running I’ll be posting blogs about Databuzz and FileMaker.

 Andrew