fmAccounting Link (MYOB AccountRight Edition) Preview Video

We’ve just uploaded our first preview video for fmAccounting Link (MYOB AccountRight Edition). This video demonstrates the following:

  • authenticating against the MYOB AccountRight API
  • downloading a list of available AccountRight Company Files
  • selecting the AccountRight Company File and entering the credentials for the selected Company File
  • uploading a Contact from FileMaker Pro to AccountRight
  • uploading an Invoice from FileMaker Pro to AccountRight
  • uploading a Payment from FileMaker Pro to AccountRight
  • downloading Chart of Accounts, Tax Codes, Categories and Inventory Items from AccountRight to FileMaker

The video also demonstrates how you can integrate with MYOB AccountRight (a Windows only application) from a Mac OS X computer.

You can watch the video below or directly on YouTube via this link.

We should be releasing fmAccounting Link (MYOB AccountRight Edition) in the next couple of weeks – please Contact Us if you have any questions in the meantime.

North West Sydney FileMaker Developer Meetup Dates for 2016

The dates for the North West Sydney FileMaker Developer Meetups for the rest of 2016 have been locked in:

June 17

September 16

December 9

Venue: Pennant Hills Bowling Club (short walk from Pennant Hills train station)
Time: 12.30pm

If you would like to join the mailing list just visit the signup page at:

http://databuzz.us12.list-manage.com/subscribe?u=366d1a87399a120a9d438cb56&id=8bb1fea366

We’ll send our reminders before each meeting – anyone is welcome to attend and no RSVP is required.

A Beginner’s Guide to Working with Lists in FileMaker Pro

As you become more familiar with FileMaker Pro and make the leap from beginner to intermediate developer you will inevitably become accustomed to working with lists. By list I’m referring to a series of values separated by carriage returns such as

apple
banana
pear
mango

The list might be referencing a series of repeating fields, some related fields from another table, or it might be a series of values that you concatenate manually to achieve the desired result. You might use your list in a script as part of a loop that iterates through the list and performs actions for each value in the list, such as creating a new record or sending an email. You might be creating a list of delimited data to use in a chart or you might be generating a list to use as a match field in a relationship (see below for more details).

List Related Functions

FileMaker Pro has a number of native calculation functions to help you generate lists and extract values from a list:

List ( field { ; field…} ) – the list function was originally introduced with FileMaker Pro 8.5 (there hasn’t been a .5 release since) and as it’s name suggests its sole purpose is to generate a list of values.

The field reference can be any related field, repeating field, or set of non-repeating fields; an expression that returns a field, repeating field, or a set of non-repeating fields, or a variable. For example you might wish to generate a list of all the Invoice Numbers for a particular Contact record. Assuming you have a table occurrence named Invoices that is related to Contacts by a Contact ID match field the following calculation:

List ( Invoices::InvoiceNumber )

would return the list of Invoice Numbers for the current customer record. You can mix and match field references, variables and literal strings – for example:

List ( "INV1056" ; Invoices::InvoiceNumber ; $invoiceID )

It’s important to note that the List function ignores blank values – List ( “apple” ; “” ; “banana” )  would return:

apple
banana

ValueCount – this returns a count of the total number of values in specified list. For example ValueCount ( List ( “apple” ; “banana” ; “orange” ) ) returns 3.

LeftValues ( text; numberOfValues)  – this returns the first numberOfValues from the specified list. N.B. the resulting list of values returned always ends with a carriage return. For example LeftValues ( List ( “apple” ; “banana” ; “orange” ) ; 1 ) returns:

apple¶

RightValues ( text; numberOfValues ) – this returns the last numberOfValues from the specified list. N.B. the resulting list of values returned always ends with a carriage return. For example RightValues ( List ( “apple” ; “banana” ; “orange” ) ; 1 ) returns:

orange¶

MiddleValues( text ; startingValue ; numberOfValues)  – this returns the middle numberOfValues from the specified list, starting at startingValue. N.B. the resulting list of values returned always ends with a carriage return. For example MiddleValues ( List ( “apple” ; “banana” ; “orange” ) ; 2 ; 2 ) returns:

banana
orange¶

FilterValues ( textToFilter ; filterValues ) – this returns all the items in textToFilter that are also in filterValues, in the order they were originally entered in textToFilter. This allows you to compare two lists to find the values they both have in common. N.B. the resulting list of values returned always ends with a carriage return. For example FilterValues ( List ( “apple” ; “banana” ; “orange” ) ; “banana¶orange” ) returns:

banana
orange¶

GetValue ( listOfValues ; valueNumber )  – this allows you to retrieve a specified value from a list of values, typically used when you are looping through a list and performing some actions for each value in the list. N.B. the value returned does NOT end with a carriage return. For example GetValue ( List ( “apple” ; “banana” ; “orange” ) ; 2 )returns:

banana

Multi-Key fields

One of the more common uses for lists mentioned above was for use as a match field in a relationship. Most relationships typically use a single field/value on both sides of the relationship. For example the Company ID field in the Companies table (primary key) matches the Company ID field in the Users table (foreign key). FileMaker Pro also lets you enter mutliple values into the same field which has the effect of increasing the number of possible matching values on the other side of the relationship. You simply enter the values separated by carriage returns and FileMaker will look for matches for every line/value you have entered.

If you entered the following values into a text field (you would typically use a text field with global storage):

C1045
C2784
C3698
C1077

FileMaker Pro will then look for any matching records for each of these 4 values. Multi-key fields can be a very powerful feature of FileMaker Pro and are also often referred to as multi-line keys.

Generating a list of values from a field in a found set of records

One of my favourite new features of FileMaker Pro v13 was the new “List of” option when creating a Summary field. This option creates a return-delimited list of non-blank values in specified field for the current found set of records. One obvious purpose of this function is to create a list to use for a Multi-key field – you can’t use a Summary field itself as the match field in a relationship but you can use the result it generates in a global or calculation field.

I would also recommend reading the fileMakerhacks series on using Summary list fields in relationships.

Custom Functions and Plug-in Functions

There will be times where you need to manipulate lists and go beyond the native FileMaker functions – for example you might want to compare two lists and return all the values that are different in both lists, sort the list of values, or you might want to remove any duplicate values from a list. Here’s some of the custom functions and external plug-in functions that I use on a regular basis:

SortList ( ValueList ; Sort ; Type ) – this custom function allows you to sort a list with options for ascending or descending order

XORvalues ( ListA ; ListB ) – this custom function returns all lines that are different in two lists. If you only specify one list it will also eliminate duplicates from the list and return a single instance of each value

ZapValues ( ListA ; ListB ) – this custom function will compare two lists and remove the items in List B from List A (this is the inverse of the native FilterValues function)

Trim4 ( text ) – if you are using the native functions that also return a trailing carriage return you can use this custom function to remove this at the same time

AddRemoveListItem ( theList ; value ) – this custom function will add an item to a list if it does not already exist; otherwise the item is removed from the list

There will be times when you are not able to use a custom function due to the limitations of custom functions – recursive custom functions are limited to either 10,000 interactions or 50,000 iterations depending on the style of recursion they use (this article has more details on the limitations). When you hit these limitations you will need to use a plug-in function which are not bound by the same limitations as custom functions. Databuzz is a proud sponsor of the open source BaseElements plug-in which has a number of handy list related functions including:

BE_Values_Unique ( listOfValues {; caseSensitive } ) – this removes any duplicate values from the specified list

BE_Values_Sort  ( listOfValues ) – this sorts the list in alphanumeric order

BE_Values_FilterOut ( textToFilter ; filterValues {; caseSensitive } ) – similar to the ZapValues custom function, this will compare two lists and remove items from the textToFilter list that are found in the filterValues list
(N.B. all references are to FileMaker Pro v14 which was the current shipping version at the time this article was written)

Simple FileMaker Server Monitoring

If you’re deploying mission critical FileMaker solutions hosted by FileMaker Server then monitoring the state of your databases and servers is an important part of ensuring everything is running smoothly. Server monitoring is something that’s normally managed by the IT department using dedicated monitoring tools and services to keep an eye on everything, however if you don’t have a dedicated IT department but still need to monitor the uptime of your FileMaker Server databases you will need to implement your own custom monitoring solution.

FileMaker Server has the ability to send email notifications to a nominated email address when errors are logged or when either warnings or errors are logged. However if you’re using web publishing it’s important to note that FileMaker Server sends no email notifications for web publishing errors or warnings. If you need to monitor your web publishing service or would like to do some custom monitoring to check that a particular database is currently hosted then you will need to implement your own monitoring solution.

There’s a number of commercial monitoring services – I’ve used Pingdom and Monitis – which will check for a response from a particular URL and notify you via email/SMS when it encounters an error. You can also tell it what content to expect for a successful result, rather than just relying on a generic HTTP 200 server response. With a bit of PHP code and FileMaker’s PHP API you can quickly setup a custom PHP page to check that the web publishing service is running or that a particular database is currently being hosted, and output a success or error message. You will need to deploy and enable Custom Web Publishing with PHP on your FileMaker Server first, and know where to find the web server root folder on your FileMaker Server machine:

  • on Mac OS X you can find this at /Library/FileMaker Server/HTTPServer/htdocs (or /Library/FileMaker Server/HTTPServer/htdocs/httpsRoot  if you have enabled HTTPS/SSL)
  • on Windows you can find this at [drive]:\Program Files\FileMaker\FileMaker Server\HTTPServer\Conf where [drive] is the drive on which the Web Publishing Engine component of your FileMaker server deployment resides.

Creating the PHP Page:

Using your favourite text editor create a file with the .php extension as follows:

<?php

// Include FileMaker API
require_once ('FileMaker.php');

$fm = new FileMaker();

$fm->setProperty('hostspec', '127.0.0.1'); 

$listDatabases = $fm->listDatabases();

if(FileMaker::isError($listDatabases)) {
 $connectionError = 'Server Error: '. $listDatabases->getMessage(). ' (' . $listDatabases->code . ')';
 echo $connectionError;
} else {
 $connectionError = '';
 echo 'Server Connection Successful';
}

?>

This simply makes a connection to the FileMaker Server (you can change the 127.0.0.1 hostspec address if required) and calls the PHP API listDatabases method – this returns an array of databases that are available with the current server settings and the current user name and password credentials. You will notice that I have not included a FileMaker database Account Name and Password – this will only work when the setting in the FileMaker Server Admin Console List only the databases each user is authorized to access is NOT selected (found under Database Server > Security > File Display Filter).

File Display Filter

We would generally recommend that this is enabled – however this will break our PHP code which will now return an error (401 Unauthorized). We now need to include some account credentials for the database you wish to monitor – I would recommend creating a new Privilege Set/Account in your FileMaker Database just for this purpose with very limited privileges as we won’t be using it to view or create records, but simply to check that the file is being hosted (don’t forget to enable the PHP extended privileges for this Privilege Set).

The PHP code would then look like this (using an Account Name of PHPWeb and Password W3bOnly):

<?php

// Include FileMaker API
require_once ('FileMaker.php');

$fm = new FileMaker();

$fm->setProperty('hostspec', '127.0.0.1'); 
$fm->setProperty('username', 'PHPWeb'); 
$fm->setProperty('password', 'W3bOnly');

$listDatabases = $fm->listDatabases();

if(FileMaker::isError($listDatabases)) {
 $connectionError = 'Server Error: '. $listDatabases->getMessage(). ' (' . $listDatabases->code . ')';
 echo $connectionError;
} else {
 $connectionError = '';
 echo 'Server Connection Successful';
}

?>

If you would like to extend this to check whether a particular database is currently being hosted you can search the array of database names that is returned by the listDatabases method for the presence of a particular file. You can see what the listDatabases array looks like by adding the following line:

echo '<p><pre>'.print_r ($listDatabases).'</pre></p>';

We use the PHP in_array function which checks if a value exists in an array like this:

if (in_array('Contacts', $listDatabases)) {
 echo 'Contacts Database is Live';
} else {
 echo 'Contacts Database is NOT Live';
}

Here I am checking for a database named Contacts – if it is part of the array of databases it will return the string Contacts Database is Live, otherwise it will return Contacts Database is NOT Live.

Here’s the complete PHP code which checks for the individual database name:

<?php

// Include FileMaker API
require_once ('FileMaker.php');

$fm = new FileMaker();

$fm->setProperty('hostspec', '127.0.0.1'); 
$fm->setProperty('username', 'PHPWeb'); 
$fm->setProperty('password', 'W3bOnly');

$listDatabases = $fm->listDatabases();

if(FileMaker::isError($listDatabases)) {
 $connectionError = 'Server Error: '. $listDatabases->getMessage(). ' (' . $listDatabases->code . ')';
 echo $connectionError;
} else {
 $connectionError = '';
 //echo '<p><pre>'.print_r ($listDatabases).'</pre></p>';
 //echo 'Server Connection Successful';
 
 if (in_array('Contacts', $listDatabases)) {
 echo 'Contacts Database is Live';
 } else {
 echo 'Contacts Database is NOT Live';
 }
 
}

?>

N.F. If the Web Publishing Engine is not running on your FileMaker Server deployment you will get a 503 Service Unavailable error.

You can get more information about Custom Web Publishing with PHP from the FileMaker Server 14 Custom Web Publishing Guide.

FileMaker Commercial Hosting Changes

FileMaker Inc. have recently released an updated version of the FileMaker Commercial Hosting FAQ. FileMaker Commercial Hosting involves the provision of FileMaker Server from a data centre via the Internet, typically on a rental or subscription basis. There are many FileMaker Commercial Hosting providers around the world that provide an alternative to deploying FileMaker Server within your organisation. FileMaker Commercial Hosting is currently supported with the current version of FileMaker Server – v14 – on the Volume License Agreement (VLA) and Annual Volume License Agreement (AVLA) license programs (as well as the Solution Bundle Agreement (SBA) for vertical solutions).

FileMaker Inc. have announced that they will be changing the FileMaker Server End User License Agreement (EULA) to require commercial hosting providers to acquire a dedicated license for each customer. This means that commercial hosting providers will no longer be able to offer a “shared server” hosting option where multiple customers database files are stored on the same FileMaker Server for future versions of FileMaker Server.

The can read the full FileMaker Commercial Hosting FAQ here. For further details on performance management best practices on the FileMaker platform click here.

North West Sydney FileMaker Developer March Meetup

Databuzz has been organising an informal gathering of Sydney based FileMaker developers for the past few years – we  catch up over lunch at the Pennant Hills Bowling Club in north west Sydney 3-4 times per year. It started as an informal lunch between a number of developers who live within a few suburbs of each other (and the majority were named Andrew). We’ve since spread the word and called our gathering the the North West Sydney FileMaker Developer Meetup.

We don’t have a website and there’s no formal presentations – we sit around the table over a meal and a few drinks discussing all things FileMaker. We’ve recently setup a mailing list so you can be notified of upcoming meetings – we’re planning on setting the dates for the rest of 2016 in the next few weeks so everyone can put these into their diaries. If you would like to join the mailing list here’s the signup form.

The first meetup for 2016 will be happening in March where we will be discussing FileMaker’s new iOS App SDK.

Here’s the details:

Date: Friday, 18 March 2016
Venue: Pennant Hills Bowling Club (short walk from Pennant Hills train station)
Time: 12.30pm

Anyone is welcome to attend – no RSVP required.

FileMaker Inc. releases State of the Custom App Report

FileMaker Inc. today released their State of the Custom App Report –  a survey of custom app usage and results. After surveying over 490 FileMaker customers internationally in November/December 2015 they found that teams are building and using custom apps to achieve a meaningful impact for their organisations. The Key Findings included:

  • 74% saw an increase in productivity
  • 81% saw a reduction in inefficient tasks
  • 60% saw a return on investment
  • 73% consider mobility moderately to extremely important
  • 82% built internally and 52% built in less than 3 months

Custom apps are changing the way teams work – Databuzz has helped many organisations to plan, create and deploy a custom app using FileMaker Go for the iPhone and iPad in a wide variety of industries. Customers love to automate inefficient processes and reduce unnecessary paperwork and double data entry, boosting the productivity of their teams.

You can download a copy of the report here.

FileMaker Inc. has also recently released the first in a three-part series of free how-to guides that will lead teams through the process of building a custom app using the FileMaker Platform. The three-part series will cover:

  1. Plan – Your first steps toward creating a successful custom app
  2. Create – Your step-by-step guide to successfully create an app with FileMaker
  3. Deploy  – Your step-by-step guide to successfully deploy an app with FileMaker

Click here to download the Plan ebook – the Create and Deploy eBooks will be released over the next few months.

If you would like to discuss a custom app for your organisation please contact us for a free initial consultation.

Coming Soon – fmAccounting Link (MYOB AccountRight Edition)

Ever since we released our FileMaker to Xero integration solution – fmAccounting Link (Xero Edition) – in 2014 we’ve been planning to release a version for the MYOB Accounting platform. We ended up focussing solely on the Xero version for most of 2015, adding new features as Xero expanded their API and in response to customer requests.

We’ve finally been able to focus some resources on the MYOB version and while we’re not quite ready to release it to the general public we’re very happy with the progress that we’re making and wanted to share some details with you. We’re planning on releasing the following versions:

  1. fmAccounting Link (MYOB AccountRight Edition) – this will be the first version released and will work with the MYOB AccountRight Live API. There are a number of versions of AccountRight available, including Standard, Plus and Premier – as long as you’re using AccountRight Live (2015.x versions or later) you will be able to use our solution to integrate FileMaker with MYOB. Development of this version is largely completed – we still need to do more testing and create the documentation and videos etc, but we’re planning for a March 2016 release.
  2. fmAccounting Link (MYOB Essentials Edition) – this will be the second version released and will work with the MYOB Essentials Accounting API. MYOB Essentials is MYOB’s browser based accounting solution. We don’t have a release date for this at the moment but we’re hoping we can leverage a lot of the development for the AccountRight edition and have this ready in the April/May timeframe.

The initial release will allow you to perform the most requested integration functions between FileMaker and MYOB, including:

  • upload a Contact from FileMaker to MYOB
  • download Contacts from MYOB to FileMaker
  • upload an Invoice from FileMaker to MYOB
  • upload a Payment from FileMaker to MYOB

fmAccounting Link (MYOB AccountRight Edition) will work on both Windows and Macintosh platforms and work with FileMaker Pro v12, 13 and 14. It will be completely unlocked so you can integrate it into your existing FileMaker solution in whatever way suits you or your developer best.

We’re very excited about this release as FileMaker MYOB integration has always been clunky and involved lots of exporting and importing of .tab files or working with their ODBC driver which was Windows only and had it’s own set of limitations. The new MYOB APIs allow for true integration without having to export or import any data and can run on both Windows and the Macintosh platforms – in fact you can use your Mac to upload invoices to your MYOB AccountRight file, even though there is no native Mac OS X version of MYOB AccountRight!

Unfortunately there’s no developer API for AccountEdge, the Mac version of MYOB so we can’t do the same integration as we can with AccountRight and Essentials. Hopefully MYOB will release API access to AccountEdge in the future.

Please contact us if you have any questions about fmAccounting Link (MYOB AccountRight Edition) – if you would like to be notified when we release fmAccounting Link (MYOB AccountRight Edition) please join our mailing list here.

fmSMS now supports over 70 SMS Gateways

We’ve just finished updating fmSMS to support 3 more SMS Gateways, bring the total number of supported SMS Gateways to over 70! The most recent additions were

  • ClickSend – a global SMS Gateway (head office in Perth, Australia)
  • directSMS – an Australian based SMS Gateway
  • Wholesale SMS – another Australian based SMS Gateway

If there are any SMS Gateways that you would like us to support please contact us and let us know the details – we’re more than happy to support as many SMS Gateways as possible.

fmAccounting Link (Xero Edition) and the Xero API SHA2 SSL Cert Migration

Last year Xero advised developers that they will be migrating the Xero Developer API websites to use SHA2 type SSL certificates in place of the current SHA1 certificates on March 9th 2016. Xero has provided a test API site with the SHA2 SSL certificate installed for developers to run some tests to ensure their applications work with the new SSL certificates.

We’ve run a series of tests using the fmAccounting Link (Xero Edition) solution file against the test API site and are pleased to report that everything worked successfully. We were able to authenticate, download and upload data correctly, so at this stage we don’t anticipate any issues once the new SHA2 type SSL certificates go live in March.

If you encounter any issues with your own testing please let us know so we can address these ASAP.