[FX.php List] Script executes, but hangs web page
Tim 'Webko' Booth
tim at nicheit.com.au
Mon Nov 1 16:28:37 MDT 2010
Dear Bradley,
>
> Thank you for your email response.
>
> I agree completely, that's why this script is available only to
> admins of the system reviewing user delete requests.
>
> The script doesn't use a global field/variable. I only call it to
> delete the found record set. The way the Web page acts, it doesn't
> seem to return any response that the script has completed it's run.
>
> I posted my question to the FileMaker forums. Let's see if I get a
> hit there on possible problems to look for.
Please also remember that every time a web request is made, it is as
if the user has just logged in, run that one request and logged out -
I would be especially careful of Scripts if you could have more than
one web user, as you cannot tell what the 'Found Set' may be - it is
possible for WebUser1 to run the find, WebUser2 to also run a find,
and then have the script triggered by WebUser1, which may have
unintended consequences...
Personally, I have yet to find a reason that I need to run a FileMaker
script from the web - I'm not saying that there aren't times that may
be the approach, but I just have never needed to.
In this instance [1] I would probably store the -recid in an array and
then run a loop to use FMDelete to remove them.
Cheers
Webko
[1] Although I'm probably the person Jon is thinking of - I won't ever
allow a delete via the web anymore. Every system I've ever built with
this function inevitably has a user get back to me a short time later
after they managed to accidentally delete something important... I
flag them, and then do clean up directly through FileMaker every now
and again.
More information about the FX.php_List
mailing list