Forms, CDML, and adding records to related databases 
Author Message
 Forms, CDML, and adding records to related databases

I need help with the following situation and
apologize for the lengthy description.

I am trying to host an Events Calendar for the
University at which I work.  Users will be
permitted to submit events via an HTML Form.  When
a user submits an event via the Form they specify,
among other things, a begin date and an end date
for the event.  The form is processed by Web
Companion and a new record is for the event is
created in an EVENTS database.  I have related
another database called DATES to the EVENTS
database via a field called EVENTID. I want the
DATES database to store a record (EVENTID and
DATE) for each of the dates that fall between the
start date and the end date of each event.

For example, lets say that the Student Government
meets every Tuesday night on campus from 1/23/01
through 5/8/01.  When the user submits the Student
Government meeting via the HTML Form, the form
would create a new record (i.e., EVENTID=0004) in
the EVENTS database that would contain the dates
1/22/01 and 5/8/01.  Subsequently, I would like to
add 5 new records to the DATES database for
EVENTID=0004 for the dates 1/23/01, 1/30/01, 2/6/
01, 2/13/01, 2/20/01, 2/27/01, 3/6/01, 3/13/01, 3/
20/01, 3/27/01, 4/3/01, 4/10/01, 4/17/01, 4/24/01,
5/1/01, and 5/8/01. These records in the DATES
database are needed when other users search the
calendar to determine what events might be
happening on any given day.

After the HTML Form is processed to create the new
event record in the EVENTS database is there a way
for FileMaker or the Web Companion (via CDML) to
calculate the 16 new related date records that
need to be added to the DATES database using the
contents of the BEGINDATE and ENDDATE fields in
the EVENTS database?  If so, how do I use the
solution to properly update the DATES database to
prevent collision problems should 2 or more users
submit new events simultaneously via the Web?

My understanding is that once the Web Companion
processes an HTML form to add a new record to the
EVENTS database it may be difficult to determine
which record in the EVENTS database was the newly
added record. Additionally, this problem is
complicated by the possibility that 2 or more
users could submit new events simultaneously.

I hope my question makes sense.  Any assistance
anyone can offer would be greatly appreciated!!

Sent via Deja.com
http://www.***.com/



Wed, 30 Jul 2003 07:02:02 GMT
 Forms, CDML, and adding records to related databases

Quote:

> I need help with the following situation and
> apologize for the lengthy description.

No apologies required - would prefer overly wordy to not
enough info ;-)

Quote:

> I am trying to host an Events Calendar for the
> University at which I work.  Users will be
> permitted to submit events via an HTML Form.  When
> a user submits an event via the Form they specify,
> among other things, a begin date and an end date
> for the event.  The form is processed by Web
> Companion and a new record is for the event is
> created in an EVENTS database.  I have related
> another database called DATES to the EVENTS
> database via a field called EVENTID. I want the
> DATES database to store a record (EVENTID and
> DATE) for each of the dates that fall between the
> start date and the end date of each event.

> For example, lets say that the Student Government
> meets every Tuesday night on campus from 1/23/01
> through 5/8/01.  When the user submits the Student
> Government meeting via the HTML Form, the form
> would create a new record (i.e., EVENTID=0004) in
> the EVENTS database that would contain the dates
> 1/22/01 and 5/8/01.  Subsequently, I would like to
> add 5 new records to the DATES database for
> EVENTID=0004 for the dates 1/23/01, 1/30/01, 2/6/
> 01, 2/13/01, 2/20/01, 2/27/01, 3/6/01, 3/13/01, 3/
> 20/01, 3/27/01, 4/3/01, 4/10/01, 4/17/01, 4/24/01,
> 5/1/01, and 5/8/01. These records in the DATES
> database are needed when other users search the
> calendar to determine what events might be
> happening on any given day.

Not easy. A script or a calculation are required.
From your (that sysad) point of view, it's much easier
to make them submit each record seperately... also, even in the
above example, (allowing for US dates), there are dates
that don't fit within a standard University year (I'm
not sure how your Uni works, but in .au one of those is
a public holiday and a number are not in semester...)

Quote:

> After the HTML Form is processed to create the new
> event record in the EVENTS database is there a way
> for FileMaker or the Web Companion (via CDML) to
> calculate the 16 new related date records that
> need to be added to the DATES database using the
> contents of the BEGINDATE and ENDDATE fields in
> the EVENTS database?

Yes. A calc would do this best. But it's not a simple one,
and you probably also want the end user to spec 'frequency' for
the meetings / events.

Quote:
> If so, how do I use the
> solution to properly update the DATES database to
> prevent collision problems should 2 or more users
> submit new events simultaneously via the Web?

'Simultaneous' on the web is almost impossible. Looking at the
HTTP protocol[1], connections are opened to pass information,
and then *immediately* closed. The chances of two people submitting the
same form at the same time are close to non-existent.

Quote:

> My understanding is that once the Web Companion
> processes an HTML form to add a new record to the
> EVENTS database it may be difficult to determine
> which record in the EVENTS database was the newly
> added record.

Nope. Ypou can tell which record was submitted and when if you
also have date /time stamps in the database.

Quote:
> Additionally, this problem is
> complicated by the possibility that 2 or more
> users could submit new events simultaneously.

No. It's just two new records, nothing else.

Hope the above helps somewhat... I also work for a Uni, but have not
built an online events database using FileMaker. But the underlying
principle is not too difficult really...

Webko



Fri, 01 Aug 2003 12:10:02 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. cdml link to related database & record

2. CDML Updating Related Records

3. Editing related records w CDML

4. CDML and Related records

5. [WEB]Help! Field from related record w/CDML

6. CDML And Going to Related Records

7. CDML add new record.

8. CDML - locate a record via search form

9. Adding related records

10. adding related records -- error 3201

11. How to copy a field from one record to a related record in the same database

12. Using one record to access two (or more) records in another related database


 
Powered by phpBB® Forum Software