[FX.php List] About scripts
Gjermund Gusland Thorsen
ggt667 at gmail.com
Fri Sep 29 06:33:58 MDT 2006
The only time I use scripts is when I have to post process the data set by:
-fmnew
-fmedit
-fmdup
to avoid calculation fields in tables with L A R G E amount of data.
ggt667
On 9/28/06, nicholas fowlie <nickfowlie at hotmail.com> wrote:
>
>
>
> I used the same technique recently, you can add a recordID (calcualtion)
> field in the 'lookup' table and just view it through the portal, you then
> have the ID for updates/deletes if you need to in the lookup dbase if you
> need it. You just need to ensur eyou process the 'protal' data correctly
> from the FX strucutre as its stored in arrays within the 'data' part of the
> returned records
>
>
> ----- Original Message -----
> From: Andrew Denman
> To: 'FX.php Discussion List'
> Sent: Tuesday, September 26, 2006 10:40 AM
> Subject: RE: [FX.php List] About scripts
>
> Jonathan,
>
> If I read that correctly, it sounds like you could just create portals to
> the Households, Parents, and Students tables on a layout displaying Family
> records. When you call this layout via FX.php you will see the data from
> these related tables. The trick is getting the recids for editing the
> related records, but a calc field in FileMaker that you put on the layout
> should do the trick.
>
> Doing it this way, you don't have to create fields in your Family table for
> all of the data in the related tables. It's already there - why duplicate
> it?
>
> Andrew Denman
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of
> Jonathan Schwartz
> Sent: Monday, September 25, 2006 7:55 PM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] About scripts
>
> 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
>
> _______________________________________________
> 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
>
>
>
More information about the FX.php_List
mailing list