| Justin Patrin 2005-03-30, 8:57 pm |
| On Wed, 30 Mar 2005 15:23:43 -0600, Brett Bieber <brett.bieber@gmail.com> wrote:
> I'm looking for an easy way to generate a spreadsheet with checkboxes
> (checked indicating a record exists) from a many to many table.
>
> Has anyone done something like this before?
>
> From the documenation for the api: "The crossLinks array holds data
> pertaining to many-many links. If you have a table which links two
> tables together, you can use this to automatically create a set of
> checkboxes on your form."
>
> which seems to say that this is easy to accomplish... A form with
> drop downs (select/option pairs) for each relation is easily possible,
> but I can't figure out how to build an array of checkboxes.
>
> For example the first row would contain all records from table1, and
> the first column would contatin all records from table2... and if
> there were a record in the relationship table for
> table1.key,table2.key, a form checkbox would be checked in the
> corresponding cell.
>
Well....
I think what you're asking is for a form which shows a many-many
relationship as a table. Unfortunately, FormBuilder is record
oriented. This means that the crossLink part of a form, instead of
being a matrix, is a list. If you have a movie_song many-many table
and edit a movie record you get a list of all of the songs and the
option to connect them to the movie you're editing.
FormBuilder does do a matrix kind of thing, but that's for
tripleLinks. A many-many-many relationship. For example, a table which
links movies to languages and audio formats. So you can say that the
movie "Alien" is in English in Stereo and Dolby Digital, and in French
in Mono.
(Cue the fanfare!) Here's an example.
http://formbuilder.reversefold.com/index.html
Audio Formats is a tripleLink and Songs is a crossLink.
--
Justin Patrin
|