[ic] many-to-many update/Form Linking

Paul Jordan paul at gishnetwork.com
Thu Nov 13 10:51:28 EST 2003

interchange-users-bounces at icdevgroup.org wrote:
> I am trying to use the table-editor tag to update a many-to-many
> table in my database.  Each product can be in multiple categories, so
> I created two tables.  The first table is just a list of all my
> categories.  The second table (called prodcat) references a product
> to a category.  It only has two columns, sku and catid.  For example
> if product1 was in cat1 and cat2, then the prodcat table would have
> two entries for this product:
> sku, catid
> ----------
> product1.sku, cat1.id
> product1.sku, cat2.id
> I have tried to figure out how to update this table through
> Interchange, but I haven't found a solution.  I tried using the "Form
> Linking" on the item edit page, but ran into two problems. First, it
> that does not insert new lines into the prodcat database.  If I
> create a new item and try to insert data through the Form Linking,
> the data is not inserted into the database.  Second, if I manually
> insert data into the database, the Form Linking correctly shows the
> multiple lines from the prodcat table.  However when I enter the
> form, all lines in prodcat that reference product1.sku are updated to
> have the same catid.
> I'm sure someone has done something similar to this and knows the
> correct method.
> Matt Johnston
> http://www.lattaoutdoors.com
> http://www.thebackpacker.com

I *think in order to do what you want to do, you need to add an a primary key
to your prodcat table.

Set "Field indicating a valid row" to 'catid'

Set "Auto Handling blank row link key" to YES if you don't want to have to type
in the 'sku' every time.


More information about the interchange-users mailing list