CGI Form Submission to FileMaker (was: shameful admission)
CGI Form Submission to FileMaker (was: shameful admission)
- Subject: CGI Form Submission to FileMaker (was: shameful admission)
- From: Gary Lists <email@hidden>
- Date: Sun, 04 Jan 2004 07:33:44 -0500
John H. Lincoln wrote [01-03-04 7:00 AM]:
>
<shameful admission>
>
>
I am not, and will never be, adept at AppleScript.
>
>
</shameful admission>
>
>
However, I need an AppleScript solution.
>
>
I want to process emails (from OSX's Mail.app) that contain "forms
>
data" submitted from a web site, and import them automatically into a
>
FileMaker Pro database.
>
>
FileMaker I'm pretty handy with. And Mail. But AppleScript, not a
>
chance.
>
>
So, I ask you: Has anybody out there got a "customizable" solution,
>
that can be modified to match the various field names in the DB? Yes,
>
the DB field names will match the field names in the online form.
>
>
(Caution: any solution must come with foolproof instructions)
>
>
I support shareware.
>
>
Thanks.
John,
Pardon me for not quite getting your request until I read:
>
Muchas gracias to all who answered my plea for a solution.
>
>
I was surprised and relieved, when I opened my emailbox today, to find
>
the following message from an AppleScripter:
>
=============
>
i know one:
>
>
look at http://www.nullify.de/nullifySoftware/en/Software/nulliform.html
>
i guess that is what you need!!
>
=============
>
>
See for yourselves!
I think I didn't read your message closely because the subject was not
descriptive of any request and I just didn't pay much attention. (IMO, it's
best to keep a subject relevant to a request, especially when it's really a
request. ;)
Anyway, since I'm a link-clicker, I did follow the one you posted and it
made me re-read your earlier message to see what it was actually about.
In short:
You can send email submitted CGI form output to FileMaker very handily (and
freely) with a thing called 'decoder.fp3' (yeah, it's old and it works to
this very day in FM6...it's simple, really.) It's not really "decoding", of
course. "Parser" is more appropriate.
Anyway, I don't have a URL handy (or at all) but I do have both the original
fp3 format file and my current revised version, which I'm happy to send to
you, or to post, or both.
I use it with FormMail for several projects and with PhormMail (my own PHP
version of Matt Wright's Perl). When a form is submitted and arrives to
Entourage (or any email client), the body text is the submission (or
sometimes a text attachment...that's okay too). That text is imported into
FileMaker, into a new record, and into same-labeled fields as your HTML
form.
Here is a real-life sample submission --
Subject: Monthly Journal Entry
Date: Tue, 27 Nov 2001 05:22:04 -0800 (PST)
MonthlyActivityDescribe: We held a mediation training this month.
UseThisMonthBoolean: Yes
UseThisMonthDescribe: Downloaded and copied some role play samples.
HowUsefulLikkert: Useful
HowUsefulOpen: Role plays were easy to access and the students liked them.
UseTransmissionBoolean: Yes
UseTransmissionPaths: Shared resource with 4 or more others
UseTransmissionItemsShared: 14 people attended the training. We
gave copies of
seveal role plays to all of them.
UseTransmissionFeedback: they like the role plays, saying they were accurate
to their experiences as students.
UseEvalKitBoolean: Yes
UseEvalKitChanges: No changes suggested.
...
userid: evalpilot4
---------------------------------------------------------------------------
REMOTE_ADDR: xx.xx.xx.xx
HTTP_REFERER:
http://www.-------------.org/pilot/q3Ak93y0_21/form01.html
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
SCRIPT_NAME: /cgi-bin/formmail.pl
FYI: The text in FileMaker is broken down by using the Substitute()
function in FileMaker calculations. (This is equivalent, BTW, to using text
item delimiters if you were to approach this in all AppleScript).
The point is, the FM file is already set-up with your known field names,
from the HTML form, and from your email. From the above, that means that
you can grab any or all of the "FileName: " values.
You use FM's clone feature to make decoders for different forms.
My additions were rewriting the FM calculation for efficiency, making an
interface in FM, writing an import script (which takes Entourage or .txt
messages that I've dragged to the Finder and imports them all, decoding each
along the way) and including a help text (in the file). The original was
offered as a sample of the calculation and FM field system, but didn't
really provide much "user detail".
It's really as painless as could be.
Please let me know if you'd like a copy of the original and/or my updated
version.
--
Gary
P.S.
Since I've had two years more of AppleScript experience, I am almost sure I
could make a different 'decoder', that relied on AS to do the parsing and
then feeding off to FileMaker. I've not compared the speed of AS TID's and
FM's Substitute(), PatternCount() and related text functions. Bruce...?
Someone who is processing hundreds of form submissions a day may find fault
with this, but my volume is usually only a dozen per week in most cases so
this clunker has kept on clunking with little change.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.