NightWing Enterprises - FileMaker Pro Custom Development

+
+   Home    About Us    Products    Demos    Resources    FAQs    Orders    Contact   +
+

V



NightWing Enterprises — Demo for FileMaker Pro™ 8 thru 11**


To mark the release of the FileMaker Pro 9 Bible!

Multiple Script Parameter Values

Straightforward technique using standard Name/Value pairs.

+   For FileMaker 8 thru 11**   +

As a courtesy to fellow developers and potential clients, the
following demonstration file is provided for free download.


Yes, we know that various methods of passing multiple parameters have been described by others, ever since the release of FileMaker 7 in 2004. But it's time to re-think, because there are several things about the method shown here that are different! Most importantly, the method of passing parameters in the method demonstrated here:
  • Supports standard familiar name/value pairs as its input.
  • Uses only a single Custom Function to do *all* the heavy lifting.
  • Requires only a single step at the start of each script.
  • Declares each named parameter value as a correspondingly named local variable within the script, so that it can be referenced by name through the course of the script.
So, for example, if you call a script and pass a parameter such as:

"invoice: IV00147; product: PR0003289; price: $37.50; quantity: 17"

...the first line of your script immediately converts the incoming parameter to four local ($) variables, as follows:

$invoice     =  IV00147
$product     =  PR0003289
$price       =  $37.50
$quantity    =  17

The format of the name/value pairs you can use not only supports stock standard string format shown above, but also allows you to place each name/value pair on a separate line, for added clarity - or to put each name on one line with the corresponding value on the line below it (the the demo's info screen for additional details). The system also supports passing multi-value parameters (ie CR-delimited lists within a single named value).

Individual values are not normally required to be enclosed in quotes (ie quotes are optional). But quotes can be added to enable you to pass parameters that include semi-colon characters, or to preserve leading or trailing spaces as part of a value.

The demo file contains four records which provide examples of several of the different formats of name/value paired input strings that the system supports. A very simple example script passes the incoming parameter to a series of local variables - then pauses, so that you can observe the resulting variable set in the current tab of the Data Viewer (*requires FileMaker Pro 9 Advanced).

** The demo technique is fully operable in FileMaker Pro v8.x and later, but FileMaker Pro Advanced is required in order to observe the declared variable values in the Data Viewer (as pictured below), as well as to install the supplied Custom Function in your own solution files.

As a bonus, the demo file includes a second custom function, "GetNamedValue( )", that allows you to extract a designated value from a string of name/value pairs. This function returns the specified value as a result, rather than passing it to a variable, so it is suitable for use outside of scripts (eg in calculations or anywhere else you are working with data packaged as Name/Value pairs).

The system shown in this demo is an extension of a technique that is described in the FileMaker Pro 9 Bible (Chapter 13 - Scripting in Depth, pp470-472).

This demo file is unlocked and password-free, compliments of NightWing Enterprises.


Mac OS X demo download  
MacOS
Win XP/Vista demo download  
Windows
 


Multiple Parameters System for FileMaker Pro



NB: If you may require assistance implementing procedures such as those shown in our
example files, please consider establishing an account with us for developer support.






^


NWE

NightWing Enterprises
ABN 22 207 533 285
www.nightwing.com.au/FileMaker
PO Box 20, Dallas, Victoria, Australia 3047
Ph +61 3 9016 3347  •   Fax +61 3 9309 8273  •   Mobile 0409 309 143
Email: admin@nightwingenterprises.com


+
+   Home    About Us    Products    Demos    Resources    FAQs    Orders    Contact   +
+


-----------------------------------
© 2001 - 2011 NightWing Enterprises
Please report any problems with this site to:   webmaster@nightwing.com.au  

NightWing Enterprises - FileMaker Solutions:- NightWing Enterprises, and the internet code-named CobaltSky is an internationally recognized Filemaker consultant, Filemaker developer and provider of Filemaker pro custom databases, Filemaker pro custom development, Filemaker pro custom programmer services and Filemaker pro custom programming.
Site created and managed using FileMaker™ Pro.

NightWing Enterprises is a division of   d a r k s k y   m e d i a