One of the built in, hard coded limitations in FileMaker scripting is that there is only a single text parameter available when calling a script. This is a frustrating limitation, and plenty of smart developers, including myself, have their own ways of working around the issue.

Recently, the talented Todd Geist, posted on his blog about his preferred solution, which is the ability to add multiple parameters to scripts.

I like the idea, but I think it’s the wrong solution to this problem, and there is a better way to solve this issue.

A couple of things first that Todd doesn’t identify in his post :

Firstly, would it handle dynamic parameters? In other words, could a script designate that it could accept any number of parameters at run time? So you could have it send 1 item, or 10 or 100 and it would still work?

Secondly how would it handle complex data? So could you, instead of sending it just basic text, send it a whole set of data like all of the details of an invoice, with an expandable set of invoice items and or invoice payments included as well?

In my opinion, just adding multiple parameters, without trying to solve either of those issues is not worth the extra complexity.

But there is another option that would give us an answer to both issues, and allow us to use multiple parameters, and that is to give us native support for a proper structured data format like XML or JSON. My preference would be JSON given it’s web ubiquity these days, but either would do.

This way we could not only pass multiple, complex data types into script parameters, we could also use this everywhere else we can store text as well.

Currently XML and JSON parsing and encoding are only available in plugins ( so not on iOS ) or as rudimentary text parsing Custom Functions. Which doesn’t really solve the issue, or at least only solves it half way. Full native support would be my vote for a better feature to fit into FileMaker 14 than simple multiple parameter support.