<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The FileMaker Collective &#187; FM9</title>
	<atom:link href="http://fmcollective.com/category/fm9/feed/" rel="self" type="application/rss+xml" />
	<link>http://fmcollective.com</link>
	<description>Syndicating the best FileMaker blogs</description>
	<lastBuildDate>Tue, 27 Jul 2010 15:42:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Assets, Vulnerabilities, Threats, and Risks:  What Type Security Is Right For You?</title>
		<link>http://fmcollective.com/2008/06/25/assets-vulnerabilities-threats-and-risks-what-type-security-is-right-for-you/</link>
		<comments>http://fmcollective.com/2008/06/25/assets-vulnerabilities-threats-and-risks-what-type-security-is-right-for-you/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 16:07:01 +0000</pubDate>
		<dc:creator>StevenHBlackwell</dc:creator>
				<category><![CDATA[FM9]]></category>
		<category><![CDATA[Op-ed]]></category>

		<guid isPermaLink="false">http://fmcollective.com/2008/06/25/assets-vulnerabilities-threats-and-risks-what-type-security-is-right-for-you/</guid>
		<description><![CDATA[In the FileMaker Pro developer community there is a general lack of clear understanding about the need for the correct type of security in FileMaker Pro solutions.
There is too much focus on passwords and not enough focus on the protection of assets and the mitigation of adverse impacts of breaches.  There is also too [...]]]></description>
			<content:encoded><![CDATA[<p>In the FileMaker Pro developer community there is a general lack of clear understanding about the need for the <em>correct </em>type of security in FileMaker Pro solutions.</p>
<p>There is too much focus on passwords and not enough focus on the protection of assets and the mitigation of adverse impacts of breaches.  There is also too much focus on the creation of “custom” “security” systems and not enough focus on identifying threats and the risks of their occurring.  There is too much complaining about how “hard” it is to have good security and not enough appreciation about the adverse impact of having the <em>wrong</em> type of security.</p>
<p>As a result of all this, at the upcoming FileMaker Developer Conference in Phoenix I will be conducting a special session:<br />
<strong><br />
Assets, Vulnerabilities, Threats, and Risks:<br />
What Type Security Is Right For You?<br />
Tuesday, July 15th 2008<br />
11:15 AM to 12:30 PM<br />
Sonoran Ballroom H<br />
</strong><br />
This session will feature a discussion of how to determine the right type of security for your solution.  It is based on a set of circumstances specific to your individual solution, but common to all FileMaker Pro solutions.</p>
<p>All assets are subject to threats that can exploit vulnerabilities that, in turn, can breach their Confidentiality, Integrity, and Availability.  The level of adverse impact of such a breach varies situation by situation as do the risks of those threats’ occurring and the prevalence of threat agents that can trigger the exploits.</p>
<p>Security then must focus on closing vulnerabilities, on blocking threat agents, and on mitigating adverse impact of breaches.  And a great many FileMaker Pro solutions take no cognizance whatsoever of this key requirement.</p>
<p>So, if you are at the Develop Conference, feel free to stop by to listen, to contribute, or to debate this very important subject.</p>
<p>&#8212;&#8211;<br />
Steven H. Blackwell<br />
Platinum Member, FileMaker Business Alliance<br />
Partner Member, FileMaker Solutions Alliance (1997-2007)<br />
FileMaker 9 Certified Developer<br />
FileMaker 8 Certified Developer<br />
FileMaker 7 Certified Developer<br />
FileMaker Authorized Trainer</p>
]]></content:encoded>
			<wfw:commentRss>http://fmcollective.com/2008/06/25/assets-vulnerabilities-threats-and-risks-what-type-security-is-right-for-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brain Teaser &#8211; Solution</title>
		<link>http://fmcollective.com/2008/04/17/brain-teaser-solution/</link>
		<comments>http://fmcollective.com/2008/04/17/brain-teaser-solution/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 21:11:02 +0000</pubDate>
		<dc:creator>Peter Vinogradov</dc:creator>
				<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[FM9]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fmcollective.com/2008/04/17/brain-teaser-solution/</guid>
		<description><![CDATA[Alright, so nobody solved this brain teaser. I&#8217;m sure this had nothing to do with people having clients and lives, and everything to do with the original post getting hosed and the challenge being too darn hard anyway  
So here, at long last, is the solution:
mebeliLet (
[
NewSubSummary  =(  GetNthRecord (  MyTable::MyKeyField [...]]]></description>
			<content:encoded><![CDATA[<p>Alright, so nobody solved this <a title="Brain Teaser" href="http://fmcollective.com/2008/01/29/brain-teaser/">brain teaser</a>. I&#8217;m sure this had nothing to do with people having clients and lives, and everything to do with the original post getting hosed and the challenge being too darn hard anyway <img src='http://fmcollective.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So here, at long last, is the solution:</p>
<blockquote><p><span style="color: #0000ff;"><span style="position: absolute; overflow: hidden; height: 0; width: 0;"><a href="http://www.videnov.com/">mebeli</a></span>Let (<br />
[<br />
NewSubSummary  =(  GetNthRecord (  MyTable::MyKeyField ;  Get(RecordNumber)-1) &lt;&gt; </span><span style="color: #0000ff;"> MyTable::MyKeyField</span><span style="color: #0000ff;"> );  //Test if record is the start of a new subsummary. MyKeyField is the sort field for my subsummary part. </span></p>
<p><span style="color: #0000ff;">$on = $val; // $on will always be whatever $val was last<br />
$val = If (NewSubSummary; If ( $val = 1;"" ; 1) ) // switch the value of val<br />
];<br />
$on  // if $on=1, then apply the conditional format</span></p>
<p><span style="color: #0000ff;">)<em> </em></span></p></blockquote>
<p>[edit:] Or, in much simpler terms:</p>
<blockquote><p><span style="color: #0000ff;">Let (<br />
[</span><br />
<span style="color: #0000ff;">$b = If ($b ;"" ;1 )</span><br />
<span style="color: #0000ff;">];</span><br />
<span style="color: #0000ff;">$b</span><br />
<span style="color: #0000ff;">)</span></p></blockquote>
<p>To me, the interesting thing here is the way that these variable expressions are handled by FileMaker. First of all, the conditional formatting seems to get evaluated, as one might expect, from top to bottom of the page, allowing you to use variables to keep track of formatting decisions that were made earlier on the page, or even on previous pages. It seems there should be some much cooler implications of this, like multiple title headers and pseudo-headers (don&#8217;t know what I mean by that? Neither do I&#8230;). The other interesting thing is that the variables here are local variables, but they&#8217;re kept active while the whole page is rendered by preview mode, which is what allows me to make reference to the last evaluation of $val and produce the alternating effect (yeah, I know I could just as easily use global variables, but it&#8217;s handy to know I don&#8217;t have to)</p>
<p>The reason that this gave me a checkerboard on the first try:</p>
<p><img src="http://fmcollective.com/wp-content/uploads/2008/01/croppercapture12.Png" alt="Checkers anyone?" /></p>
<p>was because I had placed the formula on a repeating field, meaning that each conditional format formula was evaluated for each repetition, left-to-right. Once I placed the calc on a regular field, the checkerboard was gone and I had nice alternating rows.</p>
<p><img src="http://fmcollective.com/wp-content/uploads/2008/04/croppercapture16.Png" alt="Eureka" /></p>
]]></content:encoded>
			<wfw:commentRss>http://fmcollective.com/2008/04/17/brain-teaser-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brain Teaser</title>
		<link>http://fmcollective.com/2008/01/29/brain-teaser/</link>
		<comments>http://fmcollective.com/2008/01/29/brain-teaser/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 11:53:26 +0000</pubDate>
		<dc:creator>Peter Vinogradov</dc:creator>
				<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[FM9]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fmcollective.com/2008/01/29/brain-teaser/</guid>
		<description><![CDATA[I was working on a crosstab report to show grade distributions and I wanted alternating highlights. I was using Mikhai Edoshin&#8217;s snazzy technique (http://edoshin.skeletonkey.com/2006/12/crosstab_report.html), which meant that each row was a subsummary part, which, at least in my copy of FileMaker, doesn&#8217;t support alternating fill. Like an idiot, I threw in a conditional format
&#8212;&#8212;&#8212;&#8212;-
EDIT: This [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a crosstab report to show grade distributions and I wanted alternating highlights. I was using Mikhai Edoshin&#8217;s snazzy technique (<a href="http://edoshin.skeletonkey.com/2006/12/crosstab_report.html">http://edoshin.skeletonkey.com/2006/12/crosstab_report.html</a>), which meant that each row was a subsummary part, which, at least in my copy of FileMaker, doesn&#8217;t support alternating fill. Like an idiot, I threw in a conditional format</p>
<p>&#8212;&#8212;&#8212;&#8212;-</p>
<p>EDIT: This post got hosed somehow, and everything beyond the part where I refer to myself as an idiot was erased. I can&#8217;t remember what was idiotic about my original conditional formatting in this case (if I weren&#8217;t such an idiot, I&#8217;d probably remember). In any case, below is a reprise of the brain teaser:</p>
<p>&#8212;&#8212;&#8212;&#8211;</p>
<p>Each line in Edoshin&#8217;s crosstab technique is basically a repeating summary field based on a repeating summary calc. My goal was to get each one of these repeating fields to alternate its background fill. Using any kind of Mod-based calculation based on record number was going to fail, since these fields are on a subsummary, and there&#8217;s no way to predict how many records correspond to each subsummary part.</p>
<p>Taking a purely throw-rocks-at-it-until-it-stops-moving approach, I opened up the conditional formatting dialog on that repeating summary field, and hammered out a calculation. I was astounded, when I went back to preview mode, to see this:</p>
<p><img src="http://fmcollective.com/wp-content/uploads/2008/01/croppercapture12.Png" alt="Checkers anyone?" /></p>
<p>My conditional formatting calc had inadvertently produced a checkerboard pattern. I realized, shortly thereafter, that by placing the same calc on a <em>regular </em>field, rather than a <em>repeating </em>field, I could get the alternating pattern as I desired:</p>
<p><img src="http://fmcollective.com/wp-content/uploads/2008/04/croppercapture16.Png" alt="Eureka" /></p>
<p>The brain teaser challenge, before it got erased, was to figure out what sort of calculation could yield this effect on a subsummary part. The reward, if I recall correctly, was a signed copy of my memoir.</p>
]]></content:encoded>
			<wfw:commentRss>http://fmcollective.com/2008/01/29/brain-teaser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Mapping Part Deux (Multiple Addresses)</title>
		<link>http://fmcollective.com/2007/09/05/google-mapping-part-deux-multiple-addresses/</link>
		<comments>http://fmcollective.com/2007/09/05/google-mapping-part-deux-multiple-addresses/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 01:34:19 +0000</pubDate>
		<dc:creator>mike.lee</dc:creator>
				<category><![CDATA[FM8.5]]></category>
		<category><![CDATA[FM9]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://fmcollective.com/2007/09/05/google-mapping-part-deux-multiple-addresses/</guid>
		<description><![CDATA[In my first post on this topic, I showed you how to create a simple, API-driven Google Map directly within your FileMaker Pro database.  Today, I&#8217;ll be taking that one step further.  In the previous example, you were limited to mapping one address at a time.  In this example, I&#8217;ll show you [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="/?p=43">first post on this topic</a>, I showed you how to create a simple, API-driven Google Map directly within your FileMaker Pro database.  Today, I&#8217;ll be taking that one step further.  In the previous example, you were limited to mapping one address at a time.  In this example, I&#8217;ll show you how to produce maps with multiple addresses at once.</p>
<p><a href="http://fmcollective.com/wp-content/uploads/2007/09/picture-3.png" title="Example of Multi-address mapping"><img src="http://fmcollective.com/wp-content/uploads/2007/09/picture-3.png" alt="Example of Multi-address mapping" height="419" width="495" /></a></p>
<p><span id="more-88"></span></p>
<h2>Step One</h2>
<p>Step one, of course, is to read the <a href="/?p=43">original post</a>.  Familiarize yourself with the concepts.  Is essence, we&#8217;re leveraging PHP to create a javascript page which displays the map in a FileMaker Web Viewer.  In the original post, we used the <a href="http://www.phpclasses.org/browse/package/3801.html" title="Easy Google Map" target="_blank">Easy Google Map</a> PHP class, and we&#8217;ll do the same here.  You&#8217;ll also need a <a href="http://www.google.com/apis/maps/" title="Google Maps API">Google Maps API key</a> if you wish to run this on your own server.</p>
<p>This example will be staged at <a href="http://etc.proofgroup.com/fmcollective/" target="_blank">http://etc.proofgroup.com/fmcollective/</a>.  The Easy Google Map PHP class will be hosted here <a href="http://etc.proofgroup.com/fmcollective/EasyGoogleMap.class.php" target="_blank">http://etc.proofgroup.com/fmcollective/EasyGoogleMap.class.php</a>.  Neither of these links will prove very useful to you on their own, but they will be instrumental later when I build the actual application.</p>
<p>You will need a complementary PHP file to translate the FileMaker request (a GET request via HTTP) to the Easy Google Map class.  This is where it gets just a little bit tricky.  First off, how should we send multiple addresses via a GET HTTP request?</p>
<p>Perhaps something like this:</p>
<blockquote><p><code>http://DOMAIN/MYPHPFILE.PHP?</code><code>addr1=1st_Address</code><code>&amp;addr2=2nd_Address</code></p>
</blockquote>
<p>But I can see all sorts of trouble with that, not the least of which is that it involves an ever-growing number of parameters (one for every address we want to map).  It&#8217;s also not very PHP friendly.  With some research and testing, I settled on using a PHP Array.  PHP Arrays are very nice indeed.  The only problem, how to create a PHP Array (a complex data structure) in FileMaker and then transmit it to the complementary PHP file?  It turns out, PHP has a solution for that, too.  It&#8217;s called a <a href="http://www.php.net/serialize" title="Serialized Array" target="_blank">Serialized Array</a>.  According to the PHP manual, &#8220;This is useful for storing or passing PHP values around without    losing their type and structure.&#8221;  I like it!</p>
<p>Serialized arrays are strings which look something like this:</p>
<blockquote><p><code>a:2:{i:0;s:3:"foo";i:1;s:3:"bar";}</code></p>
</blockquote>
<p>That&#8217;s a 2-item array, the first item is &#8220;foo&#8221; (index 0) and the second item is &#8220;bar&#8221; (index 1).</p>
<p>Here&#8217;s my concept: serialize the data (manually or via custom function) in FileMaker, pass the string to the PHP, unserialize it there (turning it into a full-fledged array), and using the native PHP array to build the map data points via looping through the array items.</p>
<h2>The Details</h2>
<p>I mentioned a custom function above.  I&#8217;ll need a custom function to translate a carriage-return separated list of data, such as this:</p>
<blockquote><p><code>One<br />
Two<br />
Three</code></p>
</blockquote>
<p>Into this:</p>
<blockquote><p><code>a:3:{i:0;s:3:"One";i:1;s:3:"Two";i:2;s:5:"Three";}</code></p>
</blockquote>
<p>I wrote a recursive custom function, called cfSerializeData, which is the following:</p>
<blockquote><p><code>/*</code></p>
<p>By: Mike Lee<br />
Date: 4 May 2007<br />
Version: 1<br />
Fxn Name: cfSerializeData<br />
Parameter: &#8216;values&#8217; &#8211; a carriage-return delimited list of values that you want to turn into a PHP serialized array of data<br />
Description: This is a recursive function that takes a list of data in &#8216;Values&#8217; and turns it into a serialized array for use<br />
within PHP (see serialize() and unserialize() in the PHP documentation).  This can be useful for passing lists of data to<br />
a PHP function&#8211;either through HTTP calls or the PHP plugin.</p>
<p>Example Input: One¶Two¶Three<br />
Example Result: a:3:{i:0;s:3:&#8221;One&#8221;;i:1;s:3:&#8221;Two&#8221;;i:2;s:5:&#8221;Three&#8221;;}</p>
<p>*/</p>
<p>Let(<br />
[<br />
//Set variables<br />
$NumItems = Case( IsEmpty( $NumItems ) or $NumItems=&#8221;0&#8243; ; ValueCount( Values ) ; $NumItems );<br />
i = ValueCount( Values ) - 1;<br />
lastItem = RightValues(values;1);<br />
lastItem = Left(lastItem;Length(lastItem)-1);<br />
remainder = LeftValues(values;ValueCount(values)-1);<br />
headertxt = &#8220;a:&#8221; &amp; $NumItems &amp; &#8220;:{&#8221;;<br />
footertxt = Case(i+1=$NumItems;&#8221;}&#8221;)<br />
]<br />
;</p>
<p>//If remainder is not empty recurse, else clear the variable and write the header txt<br />
Case( not IsEmpty( remainder );cfSerializeData( remainder );Let( $NumItems = $null ; headertxt ))</p>
<p>&amp;</p>
<p>//Actual serialized data<br />
&#8220;i:&#8221; &amp; i &amp; &#8220;;s:&#8221; &amp; Length(lastItem) &amp; &#8220;:\&#8221;&#8221; &amp; lastItem &amp; &#8220;\&#8221;;&#8221; &amp;</p>
<p>//Write footer txt (built-in conditional)<br />
footertxt</p>
<p>)</p>
</blockquote>
<p>You can then use that custom function, or, if you don&#8217;t have FileMaker Pro Advanced, some form of script, to turn a list of addresses into a serialized array of addresses suitable for PHP.</p>
<p>List of addresses:</p>
<blockquote><p><code>1 Any Street, Anytown, Anystate, 12345<br />
2 Any Street, Anytown, Anystate, 12345<br />
3 Any Street, Anytown, Anystate, 12345<br />
4 Any Street, Anytown, Anystate, 12345</code></p>
</blockquote>
<p>Serialized array of addresses:</p>
<blockquote><p><code>a:4:{i:0;s:38:"1 Any Street, Anytown, Anystate, 12345";i:1;s:38:"2 Any Street, Anytown, Anystate, 12345";i:2;s:38:"3 Any Street, Anytown, Anystate, 12345";i:3;s:38:"4 Any Street, Anytown, Anystate, 12345";}</code></p>
</blockquote>
<h2>The Complementary PHP file</h2>
<p>All this talk about serialized arrays and custom functions and I almost forgot to say that you&#8217;ll also need a suitable, complementary PHP file to accept the request and turn it into the Google Maps request.  This is the file I&#8217;ve written, hosted at <a href="http://etc.proofgroup.com/fmcollective/googlemaparray.php" target="_blank">http://etc.proofgroup.com/fmcollective/googlemaparray.php</a>:</p>
<blockquote><p><code>&lt;?php</code></p>
<p><code>/*	File Name: googlemaparray.php<br />
File URI: http://etc.proofgroup.com/fmcollective/googlemap.php<br />
Description: Google Map API wrapper script<br />
Version: 1.1<br />
Author: Mike Lee, The Proof Group LLC<br />
Author URI: http://www.proofgroup.com<br />
*<br />
* Copyright (c) 2007-2008, The Proof Group LLC<br />
* All rights reserved.<br />
*<br />
* Redistribution and use in source and binary forms, with or without<br />
* modification, are permitted provided that the following conditions are met:<br />
* * Redistributions of source code must retain the above copyright<br />
* notice, this list of conditions and the following disclaimer.<br />
* * Redistributions in any form must reproduce the above copyright<br />
* notice, this list of conditions and the following disclaimer in the<br />
* documentation and/or other materials provided with the distribution.<br />
* * Neither the name of The Proof Group LLC nor the<br />
* names of its contributors may be used to endorse or promote products<br />
* derived from this software without specific prior written permission.<br />
*<br />
* THIS SOFTWARE IS PROVIDED BY THE PROOF GROUP LLC ``AS IS'' AND ANY<br />
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED<br />
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE<br />
* DISCLAIMED. IN NO EVENT SHALL &lt;copyright holder&gt; BE LIABLE FOR ANY<br />
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES<br />
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;<br />
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND<br />
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT<br />
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS<br />
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br />
*/</code></p>
<p><code>require 'EasyGoogleMap.class.php';</code></p>
<p><code>//Google Maps API Key<br />
$googlemaps_api_key = "XXX-XXX-XXX-INSERT-YOUR-KEY-HERE";</code></p>
<p>//Get the &#8216;addr&#8217; parameter from the GET request<br />
$addrarray = $_GET[&#8217;addr&#8217;];<br />
$addrarray = stripslashes($addrarray);</p>
<p>$addrarray = unserialize($addrarray);</p>
<p>$gm = &amp; new EasyGoogleMap($googlemaps_api_key);</p>
<p># Set address point(s)<br />
foreach( $addrarray as $key =&gt; $value){<br />
$gm-&gt;SetAddress($value);<br />
}</p>
<p># To Enable/Disable Map Type (Map/Satellite/Hybrid)<br />
$gm-&gt;mMapType = TRUE;</p>
<p># Set map size<br />
$gm-&gt;SetMapWidth(&#8217;700&#8242;);<br />
$gm-&gt;SetMapHeight(&#8217;500&#8242;);</p>
<p># Set map zoom<br />
$gm-&gt;SetMapZoom(8);</p>
<p><code></code><code></code><code>?&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;The Proof Group: Google Map Array API Example&lt;/title&gt;<br />
&lt;?php echo $gm-&gt;GmapsKey(); ?&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;center&gt;<br />
&lt;?php<br />
echo $gm-&gt;MapHolder();<br />
echo $gm-&gt;InitJs();<br />
echo $gm-&gt;UnloadMap();<br />
?&gt;<br />
&lt;font face="arial, helvetica, verdana, sans-serif" size="-1"&gt;<br />
Google Maps Array API Example hosted by &lt;a href="http://www.proofgroup.com"&gt;The Proof Group&lt;/a&gt;.&lt;br&gt;<br />
See the original post on this topic at &lt;a href="http://fmcollective.com/?p=88"&gt;The FileMaker Collective&lt;/a&gt; for more information.&lt;p&gt;<br />
&lt;/center&gt;<br />
&lt;/font&gt;<br />
&lt;font face="arial, helvetica, verdana, sans-serif" size="-2"&gt;<br />
Terms of Use: Thank you for using &lt;a href="http://www.proofgroup.com"&gt;The Proof Group&lt;/a&gt; Google Maps API. (1) You may not use this API for commercial purposes (2) Use of this API is limited to 100 requests per IP per day (3) You are subject to all terms and conditions of the Google Maps API Terms of Use, &lt;a href="http://www.google.com/apis/maps/terms.html"&gt;<br />
http://www.google.com/apis/maps/terms.html&lt;/a&gt;.<br />
&lt;/font&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
</blockquote>
<p>The important part is the &#8216;foreach&#8217;, <code>foreach( $addrarray as $key =&gt; $value) {$gm-&gt;SetAddress($value);}</code>, which loops through the array and adds all the addresses as individual map points.  This is really the only major difference betweent he single-point mapping PHP file and this one.</p>
<h2>What of FileMaker</h2>
<p>How does this work from within FileMaker?  Essentially, using a list of addresses, you loop through the addresses and capture them to a carriage-return delimited list &#8211; the old <code>SetField(LIST;LIST &amp; myAddress &amp; ¶)</code> trick.</p>
<p>Once you&#8217;ve got the list, you&#8217;ll <em>serialize</em> it using the custom function &#8211; <code>SetField(ARRAY;cfSerializeData(LIST))</code>.</p>
<p>Then, it&#8217;s just a matter of calling the correct URL from within the Web Viewer:</p>
<blockquote><p><code>http://etc.proofgroup.com/fmcollective/googlemaparray.php?addr=ARRAY</code></p>
</blockquote>
<p>First, in FileMaker, you need a table of address data.  Here I&#8217;m using some <em>really</em> awful, made-up addresses:<img src="http://fmcollective.com/wp-content/uploads/2007/09/picture-1-copy.png" alt="Table of Addresses" /></p>
<p>I&#8217;ve also created a Globals table, with the fields: ARRAY, LIST, and URL (all of which are text, globals).</p>
<p>In layout mode, add a Web Viewer (here, in an enlarged header part), point it to the Globals::URL field and name it &#8216;wv&#8217; in the object information floating window:</p>
<p><img src="http://fmcollective.com/wp-content/uploads/2007/09/picture-4.png" alt="Mapping in Layout Mode" /></p>
<p>Within FileMaker, I wrapped the entire thing into a Script called &#8220;Update Map With Found Set&#8221;, a screenshot of which follows:</p>
<p><img src="http://fmcollective.com/wp-content/uploads/2007/09/picture-2.png" title="Update Map With Found Set Script" alt="Update Map With Found Set Script" /></p>
<p>For convenience, I also attached this script to a button on the layout to update the Web Viewer.  Back in browse, get a found set (more about that later), and press the button:</p>
<p><img src="http://fmcollective.com/wp-content/uploads/2007/09/picture-3.png" title="Example of Multi-address mapping" alt="Example of Multi-address mapping" /></p>
<p>For a found set of 25 records, the request URL will look something like this (pardon the mess):</p>
<blockquote><p><a href="http://etc.proofgroup.com/fmcollective/googlemaparray.php?addr=a:25:{i:0;s:35:%22Main%20Street,%20Wallingford,%20CT,%2006492%22;i:1;s:34:%22Main%20Street,%20New%20Canaan,%20CT,%2008640%22;i:2;s:34:%22Main%20Street,%20Manchester,%20CT,%2006042%22;i:3;s:34:%22Main%20Street,%20Ridgefield,%20CT,%2006877%22;i:4;s:33:%22Main%20Street,%20Riverside,%20CT,%2006878%22;i:5;s:33:%22Main%20Street,%20Greenwich,%20CT,%2006830%22;i:6;s:28:%22Main%20Street,%20Lyme,%20CT,%2006371%22;i:7;s:31:%22Main%20Street,%20Cos%20Cob,%20CT,%2006807%22;i:8;s:34:%22Main%20Street,%20Stonington,%20CT,%2006378%22;i:9;s:31:%22Main%20Street,%20Madison,%20CT,%2006443%22;i:10;s:35:%22Main%20Street,%20New%20Britain,%20CT,%2006053%22;i:11;s:34:%22Main%20Street,%20Farmington,%20CT,%2006032%22;i:12;s:30:%22Main%20Street,%20Darien,%20CT,%2006820%22;i:13;s:35:%22Main%20Street,%20Wallingford,%20CT,%2006492%22;i:14;s:32:%22Main%20Street,%20Westport,%20CT,%2006880%22;i:15;s:31:%22Main%20Street,%20Milford,%20CT,%2006460%22;i:16;s:32:%22Main%20Street,%20Simsbury,%20CT,%2006070%22;i:17;s:32:%22Main%20Street,%20Rowayton,%20CT,%2006853%22;i:18;s:29:%22Main%20Street,%20Essex,%20CT,%2006426%22;i:19;s:32:%22Main%20Street,%20Stamford,%20CT,%2006902%22;i:20;s:37:%22Main%20Street,%20West%20Hartford,%20CT,%2006110%22;i:21;s:35:%22Main%20Street,%20Wallingford,%20CT,%2006492%22;i:22;s:33:%22Main%20Street,%20Greenwich,%20CT,%2006830%22;i:23;s:30:%22Main%20Street,%20Orange,%20CT,%2006477%22;i:24;s:40:%22Main%20Street,%20Vernon%20Rockville,%20CT,%2006066%22;}" target="_blank">http://etc.proofgroup.com/fmcollective/googlemaparray.php?addr=a:25:{i:0;s:35:&#8221;Main Street, Wallingford, CT, 06492&#8243;;i:1;s:34:&#8221;Main Street, New Canaan, CT, 08640&#8243;;i:2;s:34:&#8221;Main Street, Manchester, CT, 06042&#8243;;i:3;s:34:&#8221;Main Street, Ridgefield, CT, 06877&#8243;;i:4;s:33:&#8221;Main Street, Riverside, CT, 06878&#8243;;i:5;s:33:&#8221;Main Street, Greenwich, CT, 06830&#8243;;i:6;s:28:&#8221;Main Street, Lyme, CT, 06371&#8243;;i:7;s:31:&#8221;Main Street, Cos Cob, CT, 06807&#8243;;i:8;s:34:&#8221;Main Street, Stonington, CT, 06378&#8243;;i:9;s:31:&#8221;Main Street, Madison, CT, 06443&#8243;;i:10;s:35:&#8221;Main Street, New Britain, CT, 06053&#8243;;i:11;s:34:&#8221;Main Street, Farmington, CT, 06032&#8243;;i:12;s:30:&#8221;Main Street, Darien, CT, 06820&#8243;;i:13;s:35:&#8221;Main Street, Wallingford, CT, 06492&#8243;;i:14;s:32:&#8221;Main Street, Westport, CT, 06880&#8243;;i:15;s:31:&#8221;Main Street, Milford, CT, 06460&#8243;;i:16;s:32:&#8221;Main Street, Simsbury, CT, 06070&#8243;;i:17;s:32:&#8221;Main Street, Rowayton, CT, 06853&#8243;;i:18;s:29:&#8221;Main Street, Essex, CT, 06426&#8243;;i:19;s:32:&#8221;Main Street, Stamford, CT, 06902&#8243;;i:20;s:37:&#8221;Main Street, West Hartford, CT, 06110&#8243;;i:21;s:35:&#8221;Main Street, Wallingford, CT, 06492&#8243;;i:22;s:33:&#8221;Main Street, Greenwich, CT, 06830&#8243;;i:23;s:30:&#8221;Main Street, Orange, CT, 06477&#8243;;i:24;s:40:&#8221;Main Street, Vernon Rockville, CT, 06066&#8243;;}</a></p>
</blockquote>
<h2>What could go wrong?</h2>
<p>There&#8217;s one problem with this technique.  Here&#8217;s how to reproduce the issue.  Show all records and update the map.  With all 177 records showing, the Web Viewer map should fail and the following should be shown:</p>
<blockquote><p> Request-URI Too Large</p>
<p>The requested URL&#8217;s length exceeds the capacity limit for this server</p>
</blockquote>
<p>I&#8217;m no Apache expert, but I know this is based on some form of compile-time configuration and is specific to a GET request.  Since the Web Viewer only allows me to use GET requests, we have this upper limit issue (somewhere around 100 records in this example).  Alternatively, you can re-compile Apache, but I&#8217;ll let you figure that one out.</p>
<p>The solution, of course, is to use POST, but I&#8217;ll leave that as an exercise for the reader.  Hint: you may have to do things completely differently and FM9 helps.</p>
<p>By the way, once you add &#8220;Labels&#8221; (one for each address, for example to show demographic info) and other display niceties (e.g. varying marker icons or colors) to your request URL, the maximum number of addresses you can map will plummet.  When I&#8217;ve fleshed this out, the max easily drops to below 50 records.</p>
<p>Do have fun and let me know what you think in the comments.</p>
<p>You can download a zipped copy of the example file <a href="http://fmcollective.com/wp-content/uploads/2007/09/mapping_fmcollectivefp7.zip" title="Mapping example file (zipped FP7 file)">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fmcollective.com/2007/09/05/google-mapping-part-deux-multiple-addresses/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Pseudoportals with Alternating Fill</title>
		<link>http://fmcollective.com/2007/08/29/pseudoportals-with-alternating-fill/</link>
		<comments>http://fmcollective.com/2007/08/29/pseudoportals-with-alternating-fill/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 00:33:12 +0000</pubDate>
		<dc:creator>Peter Vinogradov</dc:creator>
				<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[FM9]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://fmcollective.com/2007/08/29/pseudoportals-with-alternating-fill/</guid>
		<description><![CDATA[Among my longest-standing feature requests for FileMaker are portal rows that slide individually to accommodate their content. Although I can usually get by with constructing my layouts in the related table, that&#8217;s an approach that usually leaves something to be desired. My favorite workaround, to date, has been what I call a &#8220;pseudoportal&#8221; (though I&#8217;m sure there&#8217;re other names [...]]]></description>
			<content:encoded><![CDATA[<p align="left">Among my longest-standing feature requests for FileMaker are portal rows that slide individually to accommodate their content. Although I can usually get by with constructing my layouts in the related table, that&#8217;s an approach that usually leaves something to be desired. My favorite workaround, to date, has been what I call a &#8220;pseudoportal&#8221; (though I&#8217;m sure there&#8217;re other names for the technique).<span id="more-84"></span></p>
<p><a href="http://fmcollective.com/wp-content/uploads/2007/08/croppercapture3.Png" title="A Pseudoportal Invoice"><img align="left" src="http://fmcollective.com/wp-content/uploads/2007/08/croppercapture3thumbnail.Png" alt="A Pseudoportal Invoice" /></a></p>
<p>To the left is an example of what I mean. This effect can&#8217;t be achieved with portals (as far as I know). In this example, the canonical approach would be to construct a layout based on the invoice line items. However, doing so would make it impossible for me to put in the text element down the right side, or to incorporate related data from multiple tables.</p>
<p>To solve the problem, I create repeating calc fields in the invoice table and define them to refer to specific related records, depending on the repetition. For example:<br />
 </p>
<hr />Let (<br />
[<br />
f =  Extend ( PO_LineItems::Item );<br />
g = GetNthRecord ( f ; Get (CalculationRepetitionNumber ))<br />
];<br />
If (g&lt;&gt;&#8221;?&#8221; ; g; &#8220;&#8221;))</p>
<hr /><a href="http://fmcollective.com/wp-content/uploads/2007/08/croppercapture4.Png" title="Pseudoportal in Layout mode"><img align="right" src="http://fmcollective.com/wp-content/uploads/2007/08/croppercapture4.thumbnail.Png" alt="Pseudoportal in Layout mode" /></a> The technique requires one such calc for each field in the pseudoportal. In layout mode, each repeating field has to overlap another, and each needs to be set to slide up based on &#8220;directly above&#8221;.</p>
<p>Now, although FM 9 didn&#8217;t fulfill my wish of making this technique obsolete, it did offer a fix for one of the shortcomings of the technique &#8211; alternate row shading. To achieve this, make sure one of your pseudoportal fields extends the width of the whole set (usually, I just use the first field). Set conditional formatting on it for the color you want using this formula:</p>
<hr />mod ( get (calculationRepetitionNumber);2) = 0</p>
<hr /><a href="http://fmcollective.com/wp-content/uploads/2007/08/croppercapture4.Png" title="Pseudoportal in Layout mode"></a>Here is a link to a technique file that illustrates what I&#8217;m talking about (it doesn&#8217;t have the shading, since I built it before 9):</p>
<p><a href="http://www.petervinogradov.com/TechniqueFiles/PV_PseudoPortals.zip">http://www.petervinogradov.com/TechniqueFiles/PV_PseudoPortals.zip</a> </p>
<p>The file also includes some fun CFs and examples for automatically balancing multi-column pseudoportals.</p>
]]></content:encoded>
			<wfw:commentRss>http://fmcollective.com/2007/08/29/pseudoportals-with-alternating-fill/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tip of the hat</title>
		<link>http://fmcollective.com/2007/08/22/tip-of-the-hat/</link>
		<comments>http://fmcollective.com/2007/08/22/tip-of-the-hat/#comments</comments>
		<pubDate>Wed, 22 Aug 2007 14:52:48 +0000</pubDate>
		<dc:creator>Peter Vinogradov</dc:creator>
				<category><![CDATA[DevCon2007]]></category>
		<category><![CDATA[FM9]]></category>
		<category><![CDATA[Op-ed]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fmcollective.com/2007/08/22/tip-of-the-hat/</guid>
		<description><![CDATA[Having skipped DevCon in order to afford an iPhone, I&#8217;ve been dealing with my DevCon envy by exploring some of the wonderful sample files that people have been putting together for FM9.
The fuss over Andy&#8217;s conditional formatting tricks, for example, is certainly well-deserved (though let&#8217;s face it, we all would have worked that stuff out on [...]]]></description>
			<content:encoded><![CDATA[<p>Having skipped DevCon in order to afford an iPhone, I&#8217;ve been dealing with my DevCon envy by exploring some of the wonderful sample files that people have been putting together for FM9.</p>
<p>The fuss over Andy&#8217;s conditional formatting tricks, for example, is certainly well-deserved (though let&#8217;s face it, we all would have worked that stuff out on our own, right? no?).  After playing with those for a bit, a post about Ray Cologon&#8217;s &#8220;Progress Bars&#8221; ( <a href="http://www.nightwing.com.au/FileMaker/demos.html">http://www.nightwing.com.au/FileMaker/demos.html</a> ) caught my attention, and I ended up spending a good afternoon hacking that file apart.<span id="more-83"></span></p>
<p>What I particularly love about this solution is the idea of dumping a bunch of webviewer resources (pictures, etc.) into the user&#8217;s temp folder using the get (temporarypath) function. While I&#8217;ve certainly employed some variations on this &#8211; sneaking some garbage PDFs into a my docs folder or out to the desktop prior to e-mailing, etc &#8211; I&#8217;ve been overlooking the temp folder for years (mostly I guess because there&#8217;s never been a convenient get function for it before). Now with FM 9 data URLs finally working, the webviewer has (almost) completely arrived, and a convenient place to dump huge amounts of rubbish couldn&#8217;t be more timely. [edit - just read the "dispatches from DevCon" post. Evidently this demo was a big hit there, too]</p>
<p>Lately, I&#8217;ve been scrambling to finish a rewrite of a scheduling solution for a school that I work for. The requirements are simple &#8211; be able to define courses in any variety of blocks and times and dynamically generate graphical student schedules with seamless handling of overlaps and conflicts. Once upon a time, I tried to achieve this using microscopic portal rows and a schedule table with zillions of records and dozens of lead-like calculations. It worked, but it was only &#8220;dynamic&#8221; from a geologic perspective and it made white smoke pour out the back of my Dell.</p>
<p>With the web viewer, of course, that all changed &#8211; almost. I was able to throw out the schedule table and generate a whole mess of CSS Divs instead. The schedules were coming out slicker and faster than ever, but FM was still doing all the heavy lifting of stitching together adjacent course blocks, knocking out overlaps, and sizing text based on available block sizes. Spitting out a batch of schedules was no longer an overnight project, but it was still burdened with a sluggishness that gnawed at me in light of all the extra coding and testing it took to implement.</p>
<p>Over the course of this project, it did occur to me to try moving the heavy lifting over to the web browser, but I hesitated for a couple of reasons:</p>
<p>- I hadn&#8217;t written a word of Javascript in over 3 years<br />
- generating HTML in an FM calc or CF is painful enough. Imagine having to debug a bunch of Javascript with escaped quotations everywhere.</p>
<p>Finally, though, it was Ray&#8217;s sample file that gave me the kick I needed. If I could simply pack my javascript into a container file, have that dumped into the user&#8217;s temp folder, and reference it in my HTML, life would be a lot simpler.</p>
<p>After two days of dusting off the cobwebs in my Javascript memory (nothing like a few years of FM calc habits to help THAT along&#8230;), I&#8217;ve finally got a rough library of functions that can connect and polish several dozen disjointed, poorly formatted div tags in a split-second. It beats the pants off the custom functions I had going in FM, and only rarely does it lock up my browser in an endless loop (okay, so there&#8217;s some debugging to do).</p>
<p>So, three cheers for sample files, particulary Ray&#8217;s 9 for 9 collection. Looking forward to 10 for 10 - unless of course FM comes out with something boneheaded, like  &#8221;FM Creative Suite&#8221;, &#8220;FMX&#8221;, &#8220;FM smooth ultra king 100s&#8221;&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://fmcollective.com/2007/08/22/tip-of-the-hat/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Conditional Formatting Tips</title>
		<link>http://fmcollective.com/2007/08/17/conditional-formatting-tips/</link>
		<comments>http://fmcollective.com/2007/08/17/conditional-formatting-tips/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 20:22:13 +0000</pubDate>
		<dc:creator>Ernest Koe</dc:creator>
				<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[FM9]]></category>

		<guid isPermaLink="false">http://fmcollective.com/2007/08/17/conditional-formatting-tips/</guid>
		<description><![CDATA[Conditional Formatting is currently my favorite FileMaker 9 feature. It used to be that we had to add all these extra barnacles to our database in the form of  fields, calculations or relationships to highlight a simple portal row. Conditional Formatting goes a long way towards eliminating all that nonsense. CF is a big [...]]]></description>
			<content:encoded><![CDATA[<p>Conditional Formatting is currently my favorite FileMaker 9 feature. It used to be that we had to add all these extra barnacles to our database in the form of  fields, calculations or relationships to highlight a simple portal row. Conditional Formatting goes a long way towards eliminating all that nonsense. CF is a big deal because for the first time in FileMaker&#8217;s product history, you can actually apply an expression (a formula) to layout objects&#8211;you can now program field objects&#8230;at least&#8230;sort of.</p>
<p>Yes, it isn&#8217;t exactly the feature I had in mind. I would have preferred to have full-blown access to all object properties and a way to program them using the calculation engine. But, Conditional Formatting gets me very close.</p>
<p>Here are a couple of basic highlighting patterns solved using CF.</p>
<p><strong>1. Highlighting a Focused Field</strong></p>
<p>There was quite a bit of buzz about Andy Lecates&#8217; DevCon 2007 session where he showed off this active-field highlighting in his demo app. Andy noted that he was almost embarrassed to tell people that the formula behind this technique was literally a &#8220;1&#8243;. This puzzled me a bit so I decided to reproduce the technique. I have been told the credit for discovering this should properly be attributed to Chad Novotony of The Support Group. Kudos, Chad; it is really quite brilliant in its simplicity.</p>
<p><span id="more-75"></span></p>
<p>You can download the example file below and check out the conditional format properties of the fields shown.</p>
<p><a href="http://fmcollective.com/2007/08/17/conditional-formatting-tips/highlight-focused-field/" rel="attachment wp-att-76" title="highlight focused field"><img src="http://fmcollective.com/wp-content/uploads/2007/08/highlight_focused_field.png" alt="highlight focused field" /></a></p>
<p>The secret sauce behind this technique is to fill the fields with your highlight color of choice <strong>before</strong> you even open up the conditional formatting dialog box. I know this sounds completely backwards but the technique is based on the principle that a field object&#8217;s conditional formating expression isn&#8217;t evaluated when your cursor is sitting in it. So, when we enter the field, its CF stops working and the field defaults to its default fill color. So, the only thing left to do now is to make CF turn the fields white when I am not in it, which is to say, always make it white <strong>all the time.</strong> The formula for that? You guess it, &#8220;1&#8243;.</p>
<p><a href="http://fmcollective.com/wp-content/uploads/2007/08/the_secret_formula.png" title="The secret formula"><img src="http://fmcollective.com/wp-content/uploads/2007/08/the_secret_formula.png" alt="The secret formula" height="374" width="482" /></a></p>
<p>I know, I know&#8230;who would have thunk it? Kudos to Chad for this gem and to Andy Lecates for making it public.</p>
<p><strong>2. Portal Row Highlighting</strong></p>
<p><a href="http://fmcollective.com/wp-content/uploads/2007/08/portal_row_highlight1.png" title="portal row highlight"><img src="http://fmcollective.com/wp-content/uploads/2007/08/portal_row_highlight1.png" alt="portal row highlight" /></a></p>
<p>This next example is a bit more straightforward. We want to select a portal row and highlight it. Do accomplish this, you need two basic components, (i) an object to serve as the base CF highlight element, and ii) a script to trip the highlight. Here&#8217;s picture of the pieces before assembly&#8230;</p>
<p><a href="http://fmcollective.com/2007/08/17/conditional-formatting-tips/portal-row-cf-breakdown/" rel="attachment wp-att-79" title="portal row cf breakdown"><img src="http://fmcollective.com/wp-content/uploads/2007/08/pr_-cf_breakdown.png" alt="portal row cf breakdown" /></a></p>
<p>The conditionally formatted object in this case is just a regular button set to turn blue if the value in a global variable, <code>$$selected</code> matches its row id. Next, make a script to set the <code>$$selected</code> global variable with the portal row&#8217;s record id. After that, bind that script to a &#8220;select&#8221; button inside the portal row and presto, portal row highlight without adding even one extra field!</p>
<p><a href="http://fmcollective.com/2007/08/17/conditional-formatting-tips/portal-row-highlight-formula/" rel="attachment wp-att-80" title="portal row highlight formula"><img src="http://fmcollective.com/wp-content/uploads/2007/08/highlight_pr_formula.png" alt="portal row highlight formula" height="347" width="448" /></a></p>
<p>Get the example file, <a href="http://fmcollective.com/wp-content/uploads/2007/08/fm9_cf_tips_1fp7.zip" title="conditional formatting example 1">conditional formatting example 1</a> to check this out yourself.</p>
<p>Cheers,</p>
<p>Ernest Koe<br />
The Proof Group LLC</p>
]]></content:encoded>
			<wfw:commentRss>http://fmcollective.com/2007/08/17/conditional-formatting-tips/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FileMaker Nine</title>
		<link>http://fmcollective.com/2007/07/10/filemaker-nine/</link>
		<comments>http://fmcollective.com/2007/07/10/filemaker-nine/#comments</comments>
		<pubDate>Tue, 10 Jul 2007 13:05:04 +0000</pubDate>
		<dc:creator>StevenHBlackwell</dc:creator>
				<category><![CDATA[FM9]]></category>

		<guid isPermaLink="false">http://fmcollective.com/?p=65</guid>
		<description><![CDATA[The release today of FileMaker Pro 9 and FileMaker Server 9 marks another milestone for FileMaker, Inc., as well as a significant new direction for the FileMaker family of products.
With the introduction of support for seamless connectivity to external SQL based data sources, the company demonstrates its continuing commitment to FileMaker Pro’s becoming an enterprise [...]]]></description>
			<content:encoded><![CDATA[<p>The release today of FileMaker Pro 9 and FileMaker Server 9 marks another milestone for FileMaker, Inc., as well as a significant new direction for the FileMaker family of products.</p>
<p>With the introduction of support for seamless connectivity to external SQL based data sources, the company demonstrates its continuing commitment to FileMaker Pro’s becoming an enterprise level player for businesses large and small.  The ability to draw data from back-end “big iron” types systems such as Oracle and SQL Server 2005 and to utilize those data within the FileMaker Pro solution construct will open new markets for FileMaker products and for FileMaker developers.</p>
<p>While a considerable amount of attention and experimentation will center on this External SQL Source functionality, the new FileMaker Pro 9 and FileMaker Server 9 have some additional enhancements that are both compelling and useful:</p>
<p>•Scripts can now be organized into folders and subfolders, a major step forward in organization and management of even modestly complex solutions.  Developers eagerly await the extension of this functionality to other objects such as tables, fields, layouts, and value lists.</p>
<p>•ScriptMaker now has non-modal windows, meaning that several scripts can be open for editing at the same time and that items can be copied from one to another without closing any windows.  Additionally, developers can switch between ScriptMaker windows and layout windows.</p>
<p>•An enhanced script debugger permits running of scripts with subordinate level Accounts but then temporarily authenticating for high level privilege functions.  As a result developers can see how the script behaves for different levels of privileges.</p>
<p>•Conditional formatting of layout objects, based either on hard-coded formulas or on dynamic calculation results will significantly enhance UI capabilities.  For example, if an invoice is over 60 days old, its total can be made to turn to red automatically without need for scripting or other workarounds.</p>
<p>•In FileMaker Server 9 the venerable SAT Tool has been replaced on both Macintosh and Windows platforms with a new Uniform Admin Console.  In an enhanced panel focused on connected users, the Account Name, Privilege Set name, and IP address of each connected user can be made to display.</p>
<p>•Since Custom Web Publishing is now part of the core FileMaker Server 9 product, its configuration is also managed through the Uniform Admin Console.  The configuration options have been simplified and more tightly integrated into the core parts of the Console.  For example, there is no longer the need to specify the User ID and Passcode or to have separate credentials for accessing the Web Publishing Engine’s management options.</p>
<p>•Finally, FileMaker, Inc. added several new functions to FileMaker Pro 9, my favorite of which is the Self function.  As its name implies, it returns the content of the object in which a calculation is defined. This is useful for creating a single calculation formula that can be applied to many different objects. It provides a way for a calculation to reference an associated object without having explicitly to reference it.</p>
<p>Steven H. Blackwell</p>
]]></content:encoded>
			<wfw:commentRss>http://fmcollective.com/2007/07/10/filemaker-nine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Mapping in FileMaker</title>
		<link>http://fmcollective.com/2007/05/23/google-mapping-in-filemaker/</link>
		<comments>http://fmcollective.com/2007/05/23/google-mapping-in-filemaker/#comments</comments>
		<pubDate>Wed, 23 May 2007 17:48:10 +0000</pubDate>
		<dc:creator>mike.lee</dc:creator>
				<category><![CDATA[FM8.5]]></category>
		<category><![CDATA[FM9]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://fmcollective.com/?p=43</guid>
		<description><![CDATA[UPDATE: I&#8217;ve written a follow up to this post which shows how to produce a map with multiple addresses.
Google Mapping in FileMaker
I&#8217;m sure you&#8217;ve seen the Web Viewer maps in FileMaker.  Sure, they&#8217;re serviceable, but you&#8217;ve got no control.  And with Google recently adding &#8220;Search Results&#8221; and &#8220;My Maps&#8221; to the screen as [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATE: I&#8217;ve written a <a href="/?p=88" title="Multi-address mapping">follow up to this post</a> which shows how to produce a map with multiple addresses.</p>
<h2>Google Mapping in FileMaker</h2>
<p>I&#8217;m sure you&#8217;ve seen the Web Viewer maps in FileMaker.  Sure, they&#8217;re serviceable, but you&#8217;ve got no control.  And with Google recently adding &#8220;Search Results&#8221; and &#8220;My Maps&#8221; to the screen as well (a laudable feature, to be sure), the available real estate for the actual map shrunk by almost half.  What can be done?  I&#8217;ll show you how to roll you own mapping engine using PHP and the Google Map API.</p>
<p><span id="more-43"></span></p>
<h2>Using the built-in tools</h2>
<p>Simple Google maps can be produced in FileMaker using the Web Viewer object.  I&#8217;m sure you&#8217;ve all seen this:</p>
<p><img src="http://fmcollective.com/wp-content/uploads/2007/05/google_map_webviewer.png" alt="Google Map in the Web Viewer" height="547" width="630" /></p>
<p>This is the Web Viewer Setup for that example:</p>
<p><img src="http://fmcollective.com/wp-content/uploads/2007/05/google_map_webviewer_setup.png" alt="Web Viewer Setup for Standard Google Map" height="487" width="630" /></p>
<p><strong>What&#8217;s wrong here?</strong></p>
<p>The problem with this, in my opinion, is that the <em>Search Results</em> and <em>My Maps</em> area of the map takes up almost <em>half</em> of the screen. Further, you&#8217;ve got limited to no control of how this looks.  And, one click on a link and the user is off browsing the web—not exactly what you want them to be doing.</p>
<h2>Using the API</h2>
<p>I decided to turn to the Google Maps API to attempt to solve these issues.  The first step here is to sign up for a <a href="http://www.google.com/apis/maps/" title="Google Maps API" target="_blank">Google Maps API Key</a> for the site you&#8217;ll be hosting your maps from (the maps will still need a home).</p>
<p>So as not to re-invent the wheel, my first step was to search for a PHP wrapper for the Google Maps API that I could use as the basis for my mapping API. I found one that I came to like called the <a href="http://www.phpclasses.org/browse/package/3801.html" title="Easy Google Map" target="_blank">Easy Google Map</a> class.  This PHP class wraps all the JavaScript in PHP calls, so a PHP-buff like myself can easily use it.  You&#8217;ll need to download the Easy Google Map class (&#8221;EasyGoogleMap.class.php&#8221;) and install it on a webserver that supports PHP (the same one for which you got the Google Maps API key).</p>
<p>In this example, we&#8217;ll be staging the work at <a href="http://etc.proofgroup.com/fmcollective/" title="FMCollective Staging Area" target="_blank">http://etc.proofgroup.com/fmcollective/</a>, so the class will be located at <a href="http://etc.proofgroup.com/fmcollective/EasyGoogleMap.class.php" title="Hosted Easy Google Maps Class" target="_blank">http://etc.proofgroup.com/fmcollective/EasyGoogleMap.class.php</a>.  You can load this URL now, if you&#8217;d like, but you won&#8217;t get anything because it&#8217;s a PHP class and doesn&#8217;t return anything on its own.</p>
<p>The next step, of course, is to write a complementary PHP file that will actually be the <em>mapping API</em>. My thought was to make this simple to call from FileMaker, with a URL formatted like the following:</p>
<blockquote><p><code>http://DOMAIN/MYCOMPLIMENTARYPHPFILE.PHP?addr=The+Address+To+Map</code></p></blockquote>
<p>To do this I&#8217;ll need a PHP file that can grab the &#8216;addr&#8217; parameter and process it according to the needs of the Easy Google Mapping Class in order to produce a map.</p>
<p>Here&#8217;s what my file (which I have named &#8216;googlemap.php&#8217;) looks like:</p>
<blockquote><p> <code><br />
&lt;?php<br />
/*<br />
* File Name: googlemap.php<br />
* File URI: http://etc.proofgroup.com/fmcollective/googlemap.php<br />
* Description: Google Map API wrapper script<br />
* Version: 1.0<br />
* Author: Mike Lee, The Proof Group LLC<br />
* Author URI: http://www.proofgroup.com<br />
*<br />
* Copyright (c) 2007, The Proof Group LLC<br />
* All rights reserved.<br />
*<br />
* Redistribution and use in source and binary forms, with or without<br />
* modification, are permitted provided that the following conditions are met:<br />
* * Redistributions of source code must retain the above copyright<br />
* notice, this list of conditions and the following disclaimer.<br />
* * Redistributions in any form must reproduce the above copyright<br />
* notice, this list of conditions and the following disclaimer in the<br />
* documentation and/or other materials provided with the distribution.<br />
* * Neither the name of The Proof Group LLC nor the<br />
* names of its contributors may be used to endorse or promote products<br />
* derived from this software without specific prior written permission.<br />
*<br />
* THIS SOFTWARE IS PROVIDED BY THE PROOF GROUP LLC ``AS IS'' AND ANY<br />
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED<br />
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE<br />
* DISCLAIMED. IN NO EVENT SHALL <copyright> BE LIABLE FOR ANY<br />
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES<br />
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;<br />
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND<br />
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT<br />
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS<br />
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br />
*/<br />
require 'EasyGoogleMap.class.php';<br />
# Google Maps API Key<br />
$googlemaps_api_key = "XXX-XXX-XXX-INSERT-YOUR-KEY-HERE";<br />
# Get the 'addr' parameter from the GET request<br />
$addr = $_GET['addr'];<br />
$gm = &amp; new EasyGoogleMap($googlemaps_api_key);<br />
# Set address point(s)<br />
$gm-&gt;SetAddress($addr);<br />
$gm-&gt;SetInfoWindowText($addr);<br />
$gm-&gt;SetSideClick($addr);<br />
# To Enable/Disable Map Type (Map/Satellite/Hybrid)<br />
$gm-&gt;mMapType = TRUE;<br />
# Set map size<br />
$gm-&gt;SetMapWidth('700');<br />
$gm-&gt;SetMapHeight('600');<br />
?&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;EasyGoogleMap&lt;/title&gt;<br />
&lt;?php echo $gm-&gt;GmapsKey(); ?&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;center&gt;<br />
&lt;?php<br />
echo $gm-&gt;GetSideClick();<br />
echo $gm-&gt;MapHolder();<br />
echo $gm-&gt;InitJs();<br />
echo $gm-&gt;UnloadMap();<br />
?&gt;<br />
&lt;/center&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</copyright></code></p></blockquote>
<p>Copy that text and save it as &#8216;googlemap.php&#8217; (you&#8217;ll want to insert your own API key where indicated). That file is now hosted here: <a href="http://etc.proofgroup.com/fmcollective/googlemap.php" title="Hosted Google Map API" target="_blank">http://etc.proofgroup.com/fmcollective/googlemap.php</a>. You will want to put it in the same directory you put the EasyGoogleMap.class.php file.</p>
<p>A direct link to the file, which you can download, is here: <a href="http://fmcollective.com/wp-content/uploads/2007/05/googlemapphp.txt" title="Google Map PHP File">Google Map PHP File</a>. You will need to rename the file &#8216;googlemap.php&#8217;.</p>
<p>The fmcollective directory now looks like this:</p>
<blockquote><p><code>.<br />
|-- EasyGoogleMap.class.php<br />
`-- googlemap.php<br />
</code></p></blockquote>
<p>If you load the <a href="http://etc.proofgroup.com/fmcollective/googlemap.php" title="googlemap.php" target="_blank">googlemap.php</a> page right now, you&#8217;ll notice it&#8217;s blank, because you&#8217;ve not passed it any address to map (via the &#8216;addr&#8217; parameter).</p>
<p>A fully working example URL is the following: <a href="http://etc.proofgroup.com/fmcollective/googlemap.php?addr=1600+Amphitheatre+Pkwy,+Mountain+View,+CA+94043" title="Google Headquarters" target="_blank">http://etc.proofgroup.com/fmcollective/googlemap.php?addr=1600+Amphitheatre+Pkwy,+Mountain+View,+CA+94043</a>.</p>
<h2>Put the API into FileMaker&#8217;s Web Viewer</h2>
<p>Now, let&#8217;s go back to the top and put this into FileMaker&#8217;s Web Viewer.  Here&#8217;s a screenshot of what the finished product looks like:</p>
<p><img src="http://fmcollective.com/wp-content/uploads/2007/05/google_map_custom.png" alt="Google Map using a Custom PHP API" height="547" width="630" /></p>
<p>The Web Viewer setup is for a &#8216;Custom Web Address&#8217; set to the following:</p>
<blockquote><p><code>"http://etc.proofgroup.com/fmcollective/googlemap.php?" &amp; "addr=" &amp; /*Address=*/ Contact Preferred Address::Street &amp; ", " &amp; /*City=*/ Contact Preferred Address::City &amp; ", " &amp; /*State=*/ Contact Preferred Address::StateProv &amp; " " &amp; /*Zip Code=*/ Contact Preferred Address::PostalCode</code></p></blockquote>
<p>I hope you&#8217;ve enjoyed my first post and learned something useful.  Comments are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://fmcollective.com/2007/05/23/google-mapping-in-filemaker/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
