[FX.php List] Problems on a looping edit

Bob Patin bob at patin.com
Thu Apr 2 13:42:13 MDT 2009


I've done a lot of loops that edit records just as you're trying to  
do, and they always seem to work just fine. I've not tried 200 though.

Obviously you know that $foundCount is being properly set...

Is it that the loop is sropping, or is it that the recID, as set by  
$myRecID, isn't getting a valid value?

Assuming the loop isn't stalling out and is iterating the full number  
of times, then I'd look at $myRecID as the culprit; if it's not a  
legit recid, then FileMaker won't do anything with it.

Have you tried echoing the errorCode?

Bob Patin




Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
iChat: bobpatin
AIM: longterm1954
FileMaker 9 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--------------------------
FileMaker hosting and consulting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting

On Apr 2, 2009, at 2:25 PM, John Funk wrote:

> I use an include function to show the array after submitting for  
> debugging. The problem is not the array it is the editFM() function  
> stops prematurely.
> Thanks
>
>
> On 4/2/09 2:09 PM, "Dale Bengston" <dbengston at tds.net> wrote:
>
>>
>> Hi John,
>>
>> Have you done print_r() on your $_REQUEST array to make sure you're  
>> getting what you think you're getting?
>>
>> Dale
>>
>>
>> On Apr 2, 2009, at 1:22 PM, John Funk wrote:
>>
>>> I have a page with a list of check boxes, when the page gets  
>>> submited the data is read from the request and written to  
>>> FileMaker. So far so good. But for some unknown reason the  
>>> FMEdit() function stops short of the foundcount.( I need to edit  
>>> as many as 200 in a loop)
>>>  When I comment out the lines that perform the edit, the page runs  
>>> complete. Is there a time out that I need to change or is there  
>>> something wrong with my code:
>>>  $foundCount='0';
>>>  $groupSize='1';
>>>
>>>  $foundCount = $_REQUEST["foundCount"];
>>>  $x = 1;
>>>  while ($x < $foundCount)
>>>  {
>>>  $myRecID = $_REQUEST["recID_".$x];
>>>  $M = $_REQUEST["M".$x];
>>>  $D = $_REQUEST["D".$x];
>>>  echo $myRecID."  ".$M." ".$D."<br>";
>>>  $request = new FX($ServerIP, '80', 'FMPro7');
>>>  $request->SetDBData($db,'web_products_selected',$groupSize);
>>>  $request->SetDBUserPass($fmAccount, $fmPass);
>>>  $request->AddDBParam('-recid', $myRecID);
>>>  $request->AddDBParam('Manufacturer', $M);
>>>  $request->AddDBParam('Distributor', $D);
>>>  $result = $request->FMEdit();
>>>  echo $myRecID."  ".$M." ".$D."<br>"; // this line is for debugging
>>>  $x++;
>>>  }
>>>
>>>  Any ideas?
>>>  John Funk
>>>   _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
Skipped content of type multipart/related


More information about the FX.php_List mailing list