<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Up to Speed with the FileMaker PHP API</title>
	<link>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/</link>
	<description>smart business solutions</description>
	<pubDate>Thu, 04 Dec 2008 20:41:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1333</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Mon, 10 Nov 2008 00:39:44 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1333</guid>
		<description>William: I don't think the PHP Site Assistant will be mush help here, but I may be wrong. It is heavily focused on building an interactive PHP based site for your database.

I'm not sure how much automation you're looking for, but you can export FileMaker data to HTML tables, then open the file and clean it up in a tool like DreamWeaver. If you need a more automatic approach, you can use the XML export feature to produce custom HTML from your record data. It is a little complicated at first, but the sky's the limit with that approach, and the whole thing could be scripted to easily recreate the site as needed.

Geoff</description>
		<content:encoded><![CDATA[<p>William: I don&#8217;t think the PHP Site Assistant will be mush help here, but I may be wrong. It is heavily focused on building an interactive PHP based site for your database.</p>
<p>I&#8217;m not sure how much automation you&#8217;re looking for, but you can export FileMaker data to HTML tables, then open the file and clean it up in a tool like DreamWeaver. If you need a more automatic approach, you can use the XML export feature to produce custom HTML from your record data. It is a little complicated at first, but the sky&#8217;s the limit with that approach, and the whole thing could be scripted to easily recreate the site as needed.</p>
<p>Geoff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WilliamCB</title>
		<link>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1327</link>
		<dc:creator>WilliamCB</dc:creator>
		<pubDate>Sat, 01 Nov 2008 12:11:59 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1327</guid>
		<description>Filemaker's currently pushing itself as an alternative to Excel, which is exactly how we use it, for crunching lots of data. Now we want to display tables of data on the web. The Instant Web Publishing does what we need - simple navigation and nice control over the display of data. But we're expecting a lot more traffic than the 100 simultaneous connections the server allows. So we're looking at generating an entirely static website from the Filemaker database. That is, once the website is generated, it consists only of html files and the Filemaker database is not needed at all to serve the pages. (And yes, that means there is zero interactivity). Could we use the PHP site assistant efficiently to do this?</description>
		<content:encoded><![CDATA[<p>Filemaker&#8217;s currently pushing itself as an alternative to Excel, which is exactly how we use it, for crunching lots of data. Now we want to display tables of data on the web. The Instant Web Publishing does what we need - simple navigation and nice control over the display of data. But we&#8217;re expecting a lot more traffic than the 100 simultaneous connections the server allows. So we&#8217;re looking at generating an entirely static website from the Filemaker database. That is, once the website is generated, it consists only of html files and the Filemaker database is not needed at all to serve the pages. (And yes, that means there is zero interactivity). Could we use the PHP site assistant efficiently to do this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe&#8217;s Amazing Technicolor Weblog &#187; Blog Archive &#187; Sending email from FileMaker via PHP,&#160;revisited</title>
		<link>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1323</link>
		<dc:creator>Joe&#8217;s Amazing Technicolor Weblog &#187; Blog Archive &#187; Sending email from FileMaker via PHP,&#160;revisited</dc:creator>
		<pubDate>Wed, 22 Oct 2008 15:58:33 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1323</guid>
		<description>[...] there&#8217;s a good overview of using PHP with FM at the sixfriedrice&#160;blog. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] there&#8217;s a good overview of using PHP with FM at the sixfriedrice&nbsp;blog. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Databuzz Blog &#187; FileMaker API for PHP</title>
		<link>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1313</link>
		<dc:creator>Databuzz Blog &#187; FileMaker API for PHP</dc:creator>
		<pubDate>Thu, 09 Oct 2008 16:39:54 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1313</guid>
		<description>[...] six.fried.rice blog article &#8220;Up to Speed with the FileMaker PHP API&#8221; [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] six.fried.rice blog article &#8220;Up to Speed with the FileMaker PHP API&#8221; [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antony</title>
		<link>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1308</link>
		<dc:creator>antony</dc:creator>
		<pubDate>Wed, 24 Sep 2008 14:11:32 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1308</guid>
		<description>I made it.
here is the solution

&lt;pre&gt;&lt;code&gt;
session_start();
require_once 'FileMaker.php';
$connection =&#38; new FileMaker('GFB_Ftp', 'localhost');
$connection-&#62;setProperty('username', 'php');
$connection-&#62;setProperty('password', 'store');


$connection1 =&#38; new FileMaker('localhost', 'testfms9.arteprint.be');
$connection1-&#62;setProperty('username', 'php');
$connection1-&#62;setProperty('password', 'store');

$cmd =&#38; $connection-&#62;newFindCommand('detail_ftp');
$cmd1 =&#38; $connection1-&#62;newFindCommand('model_Custom_att');
$error_message='';


$cmd-&#62;addFindCriterion('__ID',"&#62;0");


//$cmd-&#62;addFindCriterion('Last Name', 'Coffey');
$result = $cmd-&#62;execute();


if(strlen($error_message)&#62;0)
   {
    echo $error_message;
   }
   else
   {
    //echo 'No records found';// . $result-&#62;message . '(' . $result-&#62;code . ')';
    }


if (FileMaker::isError($result)) {
   
    echo 'No records found';
    echo "&lt;a href='index.php' title='Go back' rel="nofollow"&gt;Go back&lt;/a&gt;";
    die();
}

if (FileMaker::isError($result)) {
    if ($result-&#62;code != 401) {
      echo 'Unable to find klant: ' . $result-&#62;message . '(' . $result-&#62;code . ')';
      die();
    }
    else $notFound = true;
}

$records = $result-&#62;getRecords();
$res_count=count($records);
/*echo "search by :".$_GET['zoek_cat'];
echo "search text :".$_GET['search_text'];*/
echo "Records found: ".$res_count;
echo "";
echo "";
echo "IDKlantUsernamePasswordRefLangLabel";

$count=0;
foreach ($records as $record) {
 echo "";
$cat_item=html_entity_decode($records[$count]-&#62;getField('Categorie'),ENT_NOQUOTES,"ISO-8859-1");
echo "&lt;a&gt;getRecordID()."&#38;web_key=".$records[$count]-&#62;getField('web_random_key_klant')."'&#62;".$records[$count]-&#62;getField('__ID')."&lt;/a&gt;";
echo "".$records[$count]-&#62;getField('klant')."";
echo "".$records[$count]-&#62;getField('userName')."";
echo "".$records[$count]-&#62;getField('passWord')."";

$cmd1-&#62;addFindCriterion('__ID',$records[$count]-&#62;getField('__ID'));
$result1 = $cmd1-&#62;execute();
$records1 = $result1-&#62;getRecords();

foreach ($records1 as $record1) {
echo "".$record1-&#62;getField('ref')."";
echo "".$record1-&#62;getField('lang')."";
echo "".$record1-&#62;getField('label')."";
}
/*echo 'Jobnummer: ' . $records[$count]-&#62;getField('__Jobnummer') . '';
echo "Klant &lt;a&gt;getRecordID()."&#38;web_key=".$records[$count]-&#62;getField('web_random_key_klant')."'&#62;".($count+1)."&lt;/a&gt;";
echo 'Categorie: ' . $cat_item. '';
echo 'omschrijving: ' . $records[$count]-&#62;getField('Omschrijving') . '';
echo 'ref_klant_bestelbon: ' . $records[$count]-&#62;getField('ref_klant_bestelbon') . '';
echo 'c_omschrijving_1e_lijn: ' . $records[$count]-&#62;getField('c_omschrijving_1e_lijn') . '';
echo 'record id: ' . $records[$count]-&#62;getRecordID() . '';
echo 'web_random_key_klant: ' . $records[$count]-&#62;getField('web_random_key_klant') . '';
echo 'ref_klant_bestelbon_2: ' . $records[$count]-&#62;getField('ref_klant_bestelbon_2') . '';
echo 'Datum_levering_ingegeven: ' . $records[$count]-&#62;getField('Datum_levering_ingegeven') . '';
echo '';*/
$count++;
echo "";
}
echo "";
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I made it.<br />
here is the solution</p>
<pre><code>
session_start();
require_once 'FileMaker.php';
$connection =&amp; new FileMaker('GFB_Ftp', 'localhost');
$connection-&gt;setProperty('username', 'php');
$connection-&gt;setProperty('password', 'store');

$connection1 =&amp; new FileMaker('localhost', 'testfms9.arteprint.be');
$connection1-&gt;setProperty('username', 'php');
$connection1-&gt;setProperty('password', 'store');

$cmd =&amp; $connection-&gt;newFindCommand('detail_ftp');
$cmd1 =&amp; $connection1-&gt;newFindCommand('model_Custom_att');
$error_message='';

$cmd-&gt;addFindCriterion('__ID',"&gt;0");

//$cmd-&gt;addFindCriterion('Last Name', 'Coffey');
$result = $cmd-&gt;execute();

if(strlen($error_message)&gt;0)
   {
    echo $error_message;
   }
   else
   {
    //echo 'No records found';// . $result-&gt;message . '(' . $result-&gt;code . ')';
    }

if (FileMaker::isError($result)) {

    echo 'No records found';
    echo "<a href='index.php' title='Go back' rel="nofollow">Go back</a>&#8220;;
    die();
}

if (FileMaker::isError($result)) {
    if ($result-&gt;code != 401) {
      echo &#8216;Unable to find klant: &#8216; . $result-&gt;message . &#8216;(&#8217; . $result-&gt;code . &#8216;)&#8217;;
      die();
    }
    else $notFound = true;
}

$records = $result-&gt;getRecords();
$res_count=count($records);
/*echo &#8220;search by :&#8221;.$_GET[&#8217;zoek_cat&#8217;];
echo &#8220;search text :&#8221;.$_GET[&#8217;search_text&#8217;];*/
echo &#8220;Records found: &#8220;.$res_count;
echo &#8220;&#8221;;
echo &#8220;&#8221;;
echo &#8220;IDKlantUsernamePasswordRefLangLabel&#8221;;

$count=0;
foreach ($records as $record) {
 echo &#8220;&#8221;;
$cat_item=html_entity_decode($records[$count]-&gt;getField(&#8217;Categorie&#8217;),ENT_NOQUOTES,&#8221;ISO-8859-1&#8243;);
echo &#8220;<a>getRecordID().&#8221;&amp;web_key=&#8221;.$records[$count]-&gt;getField(&#8217;web_random_key_klant&#8217;).&#8221;&#8216;&gt;&#8221;.$records[$count]-&gt;getField(&#8217;__ID&#8217;).&#8221;</a>&#8220;;
echo &#8220;&#8221;.$records[$count]-&gt;getField(&#8217;klant&#8217;).&#8221;";
echo &#8220;&#8221;.$records[$count]-&gt;getField(&#8217;userName&#8217;).&#8221;";
echo &#8220;&#8221;.$records[$count]-&gt;getField(&#8217;passWord&#8217;).&#8221;";

$cmd1-&gt;addFindCriterion(&#8217;__ID&#8217;,$records[$count]-&gt;getField(&#8217;__ID&#8217;));
$result1 = $cmd1-&gt;execute();
$records1 = $result1-&gt;getRecords();

foreach ($records1 as $record1) {
echo &#8220;&#8221;.$record1-&gt;getField(&#8217;ref&#8217;).&#8221;";
echo &#8220;&#8221;.$record1-&gt;getField(&#8217;lang&#8217;).&#8221;";
echo &#8220;&#8221;.$record1-&gt;getField(&#8217;label&#8217;).&#8221;";
}
/*echo &#8216;Jobnummer: &#8216; . $records[$count]-&gt;getField(&#8217;__Jobnummer&#8217;) . &#8221;;
echo &#8220;Klant <a>getRecordID().&#8221;&amp;web_key=&#8221;.$records[$count]-&gt;getField(&#8217;web_random_key_klant&#8217;).&#8221;&#8216;&gt;&#8221;.($count+1).&#8221;</a>&#8220;;
echo &#8216;Categorie: &#8216; . $cat_item. &#8221;;
echo &#8216;omschrijving: &#8216; . $records[$count]-&gt;getField(&#8217;Omschrijving&#8217;) . &#8221;;
echo &#8216;ref_klant_bestelbon: &#8216; . $records[$count]-&gt;getField(&#8217;ref_klant_bestelbon&#8217;) . &#8221;;
echo &#8216;c_omschrijving_1e_lijn: &#8216; . $records[$count]-&gt;getField(&#8217;c_omschrijving_1e_lijn&#8217;) . &#8221;;
echo &#8216;record id: &#8216; . $records[$count]-&gt;getRecordID() . &#8221;;
echo &#8216;web_random_key_klant: &#8216; . $records[$count]-&gt;getField(&#8217;web_random_key_klant&#8217;) . &#8221;;
echo &#8216;ref_klant_bestelbon_2: &#8216; . $records[$count]-&gt;getField(&#8217;ref_klant_bestelbon_2&#8242;) . &#8221;;
echo &#8216;Datum_levering_ingegeven: &#8216; . $records[$count]-&gt;getField(&#8217;Datum_levering_ingegeven&#8217;) . &#8221;;
echo &#8221;;*/
$count++;
echo &#8220;&#8221;;
}
echo &#8220;&#8221;;
</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: antony</title>
		<link>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1307</link>
		<dc:creator>antony</dc:creator>
		<pubDate>Wed, 24 Sep 2008 13:27:08 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1307</guid>
		<description>Hello
I am using php api for filemaker.
In my layout there are fields coming form an 'external data-source' another filemaker file it is also on the same filemaker server.
The extended fmphp user and the relationships are made.
I can get the data through open remote. 
But through php i do not get the data.

can anyone give me an idea how can i do this.
i attach the php file here.
the direct data of the layout is shown without any problem.
Only the external data with ::ref,::lang,::label are not shown.

can anyone help.

Hope to hear.

regards,
antony

&lt;pre&gt;&lt;code&gt;
session_start();
require_once 'FileMaker.php';
$connection =&#38; new FileMaker('GFB_Ftp', 'localhost');
$connection-&#62;setProperty('username', 'php');
$connection-&#62;setProperty('password', 'store');

$connection1 =&#38; new FileMaker('Munutan_struct', 'localhost');
$connection1-&#62;setProperty('username', 'php');
$connection1-&#62;setProperty('password', 'store');
$cmd1 =&#38; $connection1-&#62;newFindCommand('model_Custom_attr');
$result1 = $cmd1-&#62;execute();

$cmd =&#38; $connection-&#62;newFindCommand('detail_ftp');

$error_message='';


$cmd-&#62;addFindCriterion('__ID',"&#62;0");

$result = $cmd-&#62;execute();


if(strlen($error_message)&#62;0)
   {
    echo $error_message;
   }
   else
   {
    //echo 'No records found';// . $result-&#62;message . '(' . $result-&#62;code . ')';
    }


if (FileMaker::isError($result)) {
   
    echo 'No records found';
    echo "&lt;a href='index.php' title='Go back' rel="nofollow"&gt;Go back&lt;/a&gt;";
    die();
}

if (FileMaker::isError($result)) {
    if ($result-&#62;code != 401) {
      echo 'Unable to find klant: ' . $result-&#62;message . '(' . $result-&#62;code . ')';
      die();
    }
    else $notFound = true;
}
$records1 = $result1-&#62;getRecords();
$records = $result-&#62;getRecords();
$res_count=count($records);
/*echo "search by :".$_GET['zoek_cat'];
echo "search text :".$_GET['search_text'];*/
echo "Records found: ".$res_count;
echo "";
echo "";
echo "IDKlantUsernamePasswordRefLangLabel";

$count=0;
foreach ($records as $record) {
 echo "";
$cat_item=html_entity_decode($records[$count]-&#62;getField('Categorie'),ENT_NOQUOTES,"ISO-8859-1");
echo "&lt;a&gt;getRecordID()."&#38;web_key=".$records[$count]-&#62;getField('web_random_key_klant')."'&#62;".$records[$count]-&#62;getField('__ID')."&lt;/a&gt;";
echo "".$records[$count]-&#62;getField('klant')."";
echo "".$records[$count]-&#62;getField('userName')."";
echo "".$records[$count]-&#62;getField('passWord')."";
echo "".$records1[$count]-&#62;getField('::ref')."";
echo "".$records[$count]-&#62;getField('::lang')."";
echo "".$records[$count]&#62;getField('::label')."";

$count++;
echo "";
}
echo "";
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hello<br />
I am using php api for filemaker.<br />
In my layout there are fields coming form an &#8216;external data-source&#8217; another filemaker file it is also on the same filemaker server.<br />
The extended fmphp user and the relationships are made.<br />
I can get the data through open remote.<br />
But through php i do not get the data.</p>
<p>can anyone give me an idea how can i do this.<br />
i attach the php file here.<br />
the direct data of the layout is shown without any problem.<br />
Only the external data with ::ref,::lang,::label are not shown.</p>
<p>can anyone help.</p>
<p>Hope to hear.</p>
<p>regards,<br />
antony</p>
<pre><code>
session_start();
require_once 'FileMaker.php';
$connection =&amp; new FileMaker('GFB_Ftp', 'localhost');
$connection-&gt;setProperty('username', 'php');
$connection-&gt;setProperty('password', 'store');

$connection1 =&amp; new FileMaker('Munutan_struct', 'localhost');
$connection1-&gt;setProperty('username', 'php');
$connection1-&gt;setProperty('password', 'store');
$cmd1 =&amp; $connection1-&gt;newFindCommand('model_Custom_attr');
$result1 = $cmd1-&gt;execute();

$cmd =&amp; $connection-&gt;newFindCommand('detail_ftp');

$error_message='';

$cmd-&gt;addFindCriterion('__ID',"&gt;0");

$result = $cmd-&gt;execute();

if(strlen($error_message)&gt;0)
   {
    echo $error_message;
   }
   else
   {
    //echo 'No records found';// . $result-&gt;message . '(' . $result-&gt;code . ')';
    }

if (FileMaker::isError($result)) {

    echo 'No records found';
    echo "<a href='index.php' title='Go back' rel="nofollow">Go back</a>&#8220;;
    die();
}

if (FileMaker::isError($result)) {
    if ($result-&gt;code != 401) {
      echo &#8216;Unable to find klant: &#8216; . $result-&gt;message . &#8216;(&#8217; . $result-&gt;code . &#8216;)&#8217;;
      die();
    }
    else $notFound = true;
}
$records1 = $result1-&gt;getRecords();
$records = $result-&gt;getRecords();
$res_count=count($records);
/*echo &#8220;search by :&#8221;.$_GET[&#8217;zoek_cat&#8217;];
echo &#8220;search text :&#8221;.$_GET[&#8217;search_text&#8217;];*/
echo &#8220;Records found: &#8220;.$res_count;
echo &#8220;&#8221;;
echo &#8220;&#8221;;
echo &#8220;IDKlantUsernamePasswordRefLangLabel&#8221;;

$count=0;
foreach ($records as $record) {
 echo &#8220;&#8221;;
$cat_item=html_entity_decode($records[$count]-&gt;getField(&#8217;Categorie&#8217;),ENT_NOQUOTES,&#8221;ISO-8859-1&#8243;);
echo &#8220;<a>getRecordID().&#8221;&amp;web_key=&#8221;.$records[$count]-&gt;getField(&#8217;web_random_key_klant&#8217;).&#8221;&#8216;&gt;&#8221;.$records[$count]-&gt;getField(&#8217;__ID&#8217;).&#8221;</a>&#8220;;
echo &#8220;&#8221;.$records[$count]-&gt;getField(&#8217;klant&#8217;).&#8221;";
echo &#8220;&#8221;.$records[$count]-&gt;getField(&#8217;userName&#8217;).&#8221;";
echo &#8220;&#8221;.$records[$count]-&gt;getField(&#8217;passWord&#8217;).&#8221;";
echo &#8220;&#8221;.$records1[$count]-&gt;getField(&#8217;::ref&#8217;).&#8221;";
echo &#8220;&#8221;.$records[$count]-&gt;getField(&#8217;::lang&#8217;).&#8221;";
echo &#8220;&#8221;.$records[$count]&gt;getField(&#8217;::label&#8217;).&#8221;";

$count++;
echo &#8220;&#8221;;
}
echo &#8220;&#8221;;
</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jozias</title>
		<link>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1278</link>
		<dc:creator>Jozias</dc:creator>
		<pubDate>Wed, 13 Aug 2008 20:05:53 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1278</guid>
		<description>It's not necessary... I did it... but anyway thank you</description>
		<content:encoded><![CDATA[<p>It&#8217;s not necessary&#8230; I did it&#8230; but anyway thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Shirk</title>
		<link>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1277</link>
		<dc:creator>Mike Shirk</dc:creator>
		<pubDate>Tue, 12 Aug 2008 20:36:35 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1277</guid>
		<description>We are planning to begin using PHP with our Filemaker Pro database however the Filemaker literature says that images cannot be uploaded to containers via their API.  Have others found a workaround?

Mike</description>
		<content:encoded><![CDATA[<p>We are planning to begin using PHP with our Filemaker Pro database however the Filemaker literature says that images cannot be uploaded to containers via their API.  Have others found a workaround?</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jozias</title>
		<link>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1276</link>
		<dc:creator>Jozias</dc:creator>
		<pubDate>Tue, 12 Aug 2008 19:34:43 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1276</guid>
		<description>Thank you for everything that you helped me until now... but, I have other problem. I wanna get a repetition of a container field, but I can get only if there's not repetitions, a single field. Is there solution to this problem? I hope so. Since now, thank you.

Jozias</description>
		<content:encoded><![CDATA[<p>Thank you for everything that you helped me until now&#8230; but, I have other problem. I wanna get a repetition of a container field, but I can get only if there&#8217;s not repetitions, a single field. Is there solution to this problem? I hope so. Since now, thank you.</p>
<p>Jozias</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1229</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Thu, 26 Jun 2008 16:50:44 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/up-to-speed-with-the-filemaker-php-api/#comment-1229</guid>
		<description>@jozias:

The trouble is that FileMaker never knows the boxes were checked unless you submit the form in some ways. The simple solution is just to ask your users to click a "Save" button before changing pages, but that is obviously not a very &lt;em&gt;good&lt;/em&gt; solution.

The slickest way to do this is with so-called Ajax. You can set it up so that when they click the checkbox, it immediately saves to the database, which works really well in practice. But it is a little complicated, especially if you are new to Ajax-style web development.

I don't have enough space here to do it proper justice, unfortunately. But the gist is that you want to have a javascript "onchange" handler on the checkbox that calls a Javascript function. This function would then formulate a proper PHP page url, and hit it using XMLHttpRequest. To keep things clean, you probably want to disable the checkbox before you hit the server, and then re-enable it once the change is saved. This prevents the user from clicking it repeatedly and causing some problematic race conditions.

I am a big fan of the &lt;a href="http://www.prototypejs.org/" rel="nofollow"&gt;Prototype javascript library&lt;/a&gt;, which makes all this stuff a lot easier. Assuming you have Prototype in the mix, your javascript function would look roughly like this:

&lt;pre&gt;&lt;code&gt;
function save_checkbox(field, recordid)
{
   field.disabled = true;
   new Ajax.Request("save_checkbox.php", {
      parameters: Form.serialize(field.up("FORM")),
      onSuccess: function() {
         field.disabled = false;
      },
      onFailure: function() {
         alert("Could not save checkbox!");
         field.disabled = false;
         field.checked = !field.checked;
      }
   });
}
&lt;/code&gt;&lt;/pre&gt;

On the checkbox end of things, you would need to wrap each checkbox in a form that has the appropriate information for your PHP page (like the record ID). You also add your onchange handler (which in this example uses the "bind" capability from Prototype to easy things up):

&lt;pre&gt;&lt;code&gt;
   &#60;form&#62;
      &#60;input type="hidden" name="record_id" value="..."&#62;
      &#60;input type="checkbox" name="check" value="..." onchange="save_checkbox.bind(this);"&#62;
   &#60;/form&#62;
&lt;/code&gt;&lt;/pre&gt;

This code is all "off the top of the head" so it may be a bit wrong, but hopefully it gets you going in the right direction.

Another nice enhancement is to show a "saving..." type message next to the checkbox while it is being saved so the user knows what is going on. This can be done easily by showing an HTML element in the save_checkbox function, and then hiding it again in the onSuccess and onFailure handlers.

I know this is all a bit terse, but if you dive in and review the examples from the &lt;a href="http://www.prototypejs.org/" rel="nofollow"&gt;prototype web site&lt;/a&gt; you should be able to get it working very nicely.

Geoff</description>
		<content:encoded><![CDATA[<p>@jozias:</p>
<p>The trouble is that FileMaker never knows the boxes were checked unless you submit the form in some ways. The simple solution is just to ask your users to click a &#8220;Save&#8221; button before changing pages, but that is obviously not a very <em>good</em> solution.</p>
<p>The slickest way to do this is with so-called Ajax. You can set it up so that when they click the checkbox, it immediately saves to the database, which works really well in practice. But it is a little complicated, especially if you are new to Ajax-style web development.</p>
<p>I don&#8217;t have enough space here to do it proper justice, unfortunately. But the gist is that you want to have a javascript &#8220;onchange&#8221; handler on the checkbox that calls a Javascript function. This function would then formulate a proper PHP page url, and hit it using XMLHttpRequest. To keep things clean, you probably want to disable the checkbox before you hit the server, and then re-enable it once the change is saved. This prevents the user from clicking it repeatedly and causing some problematic race conditions.</p>
<p>I am a big fan of the <a href="http://www.prototypejs.org/" rel="nofollow">Prototype javascript library</a>, which makes all this stuff a lot easier. Assuming you have Prototype in the mix, your javascript function would look roughly like this:</p>
<pre><code>
function save_checkbox(field, recordid)
{
   field.disabled = true;
   new Ajax.Request("save_checkbox.php", {
      parameters: Form.serialize(field.up("FORM")),
      onSuccess: function() {
         field.disabled = false;
      },
      onFailure: function() {
         alert("Could not save checkbox!");
         field.disabled = false;
         field.checked = !field.checked;
      }
   });
}
</code></pre>
<p>On the checkbox end of things, you would need to wrap each checkbox in a form that has the appropriate information for your PHP page (like the record ID). You also add your onchange handler (which in this example uses the &#8220;bind&#8221; capability from Prototype to easy things up):</p>
<pre><code>
   &lt;form&gt;
      &lt;input type="hidden" name="record_id" value="..."&gt;
      &lt;input type="checkbox" name="check" value="..." onchange="save_checkbox.bind(this);"&gt;
   &lt;/form&gt;
</code></pre>
<p>This code is all &#8220;off the top of the head&#8221; so it may be a bit wrong, but hopefully it gets you going in the right direction.</p>
<p>Another nice enhancement is to show a &#8220;saving&#8230;&#8221; type message next to the checkbox while it is being saved so the user knows what is going on. This can be done easily by showing an HTML element in the save_checkbox function, and then hiding it again in the onSuccess and onFailure handlers.</p>
<p>I know this is all a bit terse, but if you dive in and review the examples from the <a href="http://www.prototypejs.org/" rel="nofollow">prototype web site</a> you should be able to get it working very nicely.</p>
<p>Geoff</p>
]]></content:encoded>
	</item>
</channel>
</rss>
