[FX.php List] SetPortalRow ()

Tim 'Webko' Booth tim at nicheit.com.au
Tue Jul 28 15:22:18 MDT 2009


On 29/07/2009, at 7:12 AM, David Cox wrote:

> Hello-
>
> I have a need to create multiple records via a portal and the FX  
> documentation states that "SetPortalRow() ... is used to create a  
> record via a portal row. It's the equivalent of making several  
> AddDBParam() using the full FileMaker portal syntax".
>
> Perhaps I'm approching this incorrectly, so maybe someone could  
> point me in the right direction.  I've currently created a  
> subroutine in php which opens a connection to the database to see if  
> the applicable related records have been created yet, and if not,  
> than it will create the record.  It has up to 14 related records to  
> create, so when it is repeated, this process takes it over the 30  
> second limit

It shouldn't do that for FMNew commands...

> and throws an error when I use AddDBParam() and it's only created 4  
> records.  I've thought that maybe the SetPortalRow would allow me to  
> do the Find/Create function faster.
>
> Is this the way to go about it, or is there another way?

I very rarely use portals, I'd always be working in the sub-table. I  
have a similar routine for a survey system I'm writing, where people  
can edit and/or create new answers.

I go to the sub-table, check for the existence of that set of answers  
and then loop either creating new answers (for questions they haven't  
answered before or editing (for ones they have) and even with >40  
questions on some pages, I'm still well inside the 30s limit... That  
layout has only the 5 required fields on it.

HTH

Webko



More information about the FX.php_List mailing list