Jump to content
  • entries
    128
  • comments
    16
  • views
    43,951

FileMaker Go – Dynamic Script Triggers


eXcelisys

1,402 views

<h2>Using Dynamic Script Triggers in FileMaker Go</h2>

<p>&nbsp;</p>

<h3><b><i>What?</i></b></h3>

<p>It was a couple years ago that I was introduced to dynamic script triggering in a video by Matt Petrowski. The basic premise is that you maintain a table with the names of scripts and a label that is presented in a portal view on a layout. You attach a script to an object in that portal and triggering that button would in turn trigger a target script specified by the record clicked. The concept was powerful and uncluttered the interface by keeping all the buttons in a single portal. There is a catch; it requires a plugin and even with the advent of FileMaker 12, that dependency has not gone away.</p>

<p>With a strong emphasis on mobile computing, the inability to use plugins in FileMaker Go broke this paradigm. Or did it? While you cannot use a plugin on FileMaker Go, you can trigger scripts through the use of the FMP protocol specified in a url. You may have seen examples of this before. A link in an email opens a solution on the local device in Go. But, in this example, we are triggering scripts directly in the solution by making use of the open URL script and the FMGo Script protocol.</p>

<h3><b><i>Where?</i></b></h3>

<p>Navigation buttons are prime candidate for this type of use though you don’t have to limit yourself to just navigation. On an iPhone, users are accustomed to looking near the bottom of the screen for some type of action button that clues them in as to what actions can be performed in that given context. Having 4 to 5 iconic buttons at the bottom that are context aware saves you time.</p>

<h3><b><i>When?</i></b></h3>

<p>There is a balance between development speed and complexity that the developer should weigh. For simplistic solutions that have only minimal functionality, this approach may be overkill. But it doesn’t take very much before added functionality begins to exponentially add time when developing interfaces with buttons. You won’t get out of defining scripts unless the button has only a single function.</p>

<p>Most solutions all require some basics: navigation, create new record, delete record, search, save, edit, etc. Let’s say your solution has 2 different tables (for example, customers and orders). You could define those buttons as single actions, two for go to layout (customers, order), one for create new record, one for delete record, one for Enter Find Mode. You just defined 5 buttons! This is okay if your solution was that simple. I never have life that easy any more. My client wants to search for the customer then create the estimate using that customer. Well, now I’m defining a script to attach to that button–and so it goes.</p>

<p>Now by using an “actions” pallet, you add a table to manage the scripts and parameters you need to execute and the “context” in which they show up. Define one button and put it in a portal and you are done. Now copy and paste that portal in every layout you need it. As long as you maintain a valid relationship from that context to the actions pallet, it “just works.”</p>

<h3><b><i>Why?</i></b></h3>

<p>It’s simple. You want to be able to define code once and re-use it. I like the idea of copy/paste and that’s exactly what I do with this code. Copy a table, copy a portal with a button definition, paste that into my new solution. A couple tweaks and I’m done. No more guessing at where to fit in one more button on a layout, it was already there.</p>

<h3><b><i>How?</i></b></h3>

<p><b><i>Download the demo file and full PDF article to learn more!</i></b></p>

<div id="attachment_1050" class="wp-caption aligncenter" style="width: 239px"><a href="http://www.excelisys.com/blog/wp-content/uploads/2013/12/DynamicScriptTriggers.fmp12.zip"><img class="size-medium wp-image-1050 " title="FileMaker Go Dynamic Script Triggers Demo File" alt="FileMaker Go Developer" src="http://www.excelisys.com/blog/wp-content/uploads/2013/12/FileMakerGo_Dynamic_Script_Triggers-229x300.png" width="229" height="300" /></a><p class="wp-caption-text">FileMaker Go – FileMaker Pro Demo File</p></div>

<p><b><i>About Rob Poelking: </i></b><i>Rob is an accomplished lead Certified FileMaker Pro Developer with Excelisys who produced his first solution way back when big hair and mullets were just going out of style. His passion for FileMaker Pro programming runs so deep he’s crossed state lines over the years to follow his craft. He brings a vast experience of developing vertical market solutions for companies like 14 Floor, LLC and their PrintStar Print Management solution and Medovation, LLC with their RadRunner solution, he has been an in-house developer for a large domestic logistics company and the photo industry incorporating solutions to handle sales, repairs, and inventory management . With his breadth and width of experience Rob is a huge asset to Excelisys with the ability to provide FileMaker Pro development and consulting for our vast array of clientele and their solution requirements.</i></p>

<p><i> </i><i>In his spare time Rob is a father, winemaker, beer brewmeister, and an ordained minister who also happens to be a third degree black belt and instructor in Kajukenbo. His favorite saying is “Knock ‘em out first, pray later”.</i></p>

<p><b><i>About Excelisys, Inc.: </i></b><i>Founded in 2001, Excelisys (www.excelisys.com) is an international organization specializing in building, supporting, consulting, migrating, upgrading, tweaking, fixing, and integrating quality custom FileMaker Pro, FileMaker Go, MySQL, PostgreSQL, QuickBooks-FileMaker Pro Integration, Excel to FileMaker Pro conversions, iPhone and iPad integration, and other various database technologies and frameworks for web, mobile, and desktop deployment strategies. Contact Excelisys for a free estimate on your next project 866-592-9235.</i></p>

<a href="http://www.excelisys.com/blog/2013/12/11/filemaker-go-dynamic-script-triggers/" class='bbc_url' rel='nofollow external'>Source</a>

0 Comments


Recommended Comments

There are no comments to display.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.