[FX.php List] About scripts

Gjermund Gusland Thorsen ggt667 at gmail.com
Tue Sep 26 01:06:17 MDT 2006

My advice is split in two:1) is to make a new field that is named something
like thisIsDataFromWebValidationScriptCanBeRun and give it the value 1, then
with a trigger script run the validation script and change the value from 1
to for example 10 for validataion OK, or 11 for validation failed. 2) is to
do the validation in php or even javascript if appropriate.

On 9/26/06, Jonathan Schwartz <jonathan at eschwartz.com> wrote:
> Thanks for the heads up.  I think that I'll steer clear of scripts
> and go with Plan B.. or perhaps Plan C. ;-)
> Here's the run down...
> This is Ver2 of my first fx project, a school directory. There is a
> Households table, a Contacts (parents) table and a Students table.
> Finally, there is a Family table, which sits on top of the three
> other tables.  It is summary data from the Family table that is
> desired.  The data desired is compilation of the each Households and
> the Contacts and Students associated with each.  In short... names
> and addresses of who lives where.
> In ver1 of this project, I used a completely flat file.  All data was
> on one table. It was easy to implement in fx.  After the users did
> their data entry and edits, I split the data into the multiple
> tables.  But, that pulled the plug on any further data entry into the
> online system, once the data was exported.
> This year, in ver 2, I went the "high road" and implemented a
> relational system where data is entered directly into the various
> tables by online entry.  However, the challenge is how to pull the
> data back into the Families table (in real time) so that the user can
> proof read the result
> Plan A was to use a series of scripts which pulled the data from the
> related tables up into the Family table.  I planned to run the script
> once all the edits were complete.  Per my earlier post, I'm getting
> flaky results with the the scripts.
> Plan B could be just to use calc fields to extract the table data
> from each table.  With a max of 2 households, 2 contacts per
> household and up to 5 students per house (yup!), the calcs are finite.
> Your email prompted a third option, Plan C: to interrogate the tables
> in php with For Each loops and extract the data that way. Perhaps
> create an array for each table and then populate the Family values
> from the arrays.  Or, just populate the data right into the desired
> fields as the data is processed. See end result below:
> Students        Stu1    Stu2    Stu3    Stu4    Stu5...
> Household1
>        Street1 City1   State1  Zip1 Phone1
>        ContactFirst1   ContactLast1    ContactEmail1   ContactCell1
>        ContactFirst2   ContactLast2    ContactEmail2   ContactCel2
> Household2
>        Street2 City2   State2  Zip2 Phone2
>        ContactFirst3   etc
>        ContactFirst4   etc
> Think that I'll try it now...;-)
> Will yell if I have trouble.
> Jonathan
> >my advice about using scripts was because of performance issues. it
> >blocks access to all FMP WPE for all other requests for as long as
> >the script runs. as far as performance flaws goes, there is some
> >getting used to calling scripts because of the fact that multiple
> >requests to the db through FX (as in not using prefind for instance)
> >are not treated the same way with reference to globals - FMP global
> >fields  are cleared (reset to default) each new FX request.
> >
> >you're probably better off doing whatever you are trying to do in
> >PHP anyway... can you spell it out and maybe someone here can give
> >you a tip?
> >
> >dan
> >
> >On Sep 25, 2006, at 7:40 PM, Jonathan Schwartz wrote:
> >
> >>
> >>I'v heard recent advice not use scripts.  I'm not sure if it was
> >>because of performance slowdowns or performance flaws.
> >>
> >
> >
> >_______________________________________________
> >FX.php_List mailing list
> >FX.php_List at mail.iviking.org
> >http://www.iviking.org/mailman/listinfo/fx.php_list
> --
> Jonathan Schwartz
> FileMaker 8 Certified  Developer
> Associate Member, FileMaker Solutions Alliance
> Schwartz & Company
> jonathan at eschwartz.com
> http://www.eschwartz.com
> http://www.exit445.com
> 415-381-1852
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060926/49125371/attachment-0001.html

More information about the FX.php_List mailing list