AnsweredAssumed Answered

How to create entries with existing data in many-to-many relationship?

Question asked by fbolte on Nov 25, 2013
Latest reply on Nov 26, 2013 by fbolte

Hi all,


I'm evaluating FileMaker right now and am quite impressed so far. I'm building an image database and there I have a question regarding tagging.


I have a many-to-many relationship with a link table between IMAGES and TAGS: images <---> image2tags <---> tag


On an image's detail page, all related tags are shown in a portal, no problem so far.


Now it has to be possible to enter new connections (tags for this image).

So I enabled creation of entries via the relationship, and populate the entry field with a list based on the tags table. So when I type, FileMaker uses the type-ahead feature to propose tags based on the characters already entered. That is really great and works well.

Exept … my problem is, that it creates double entries in the tags table if a tag already exists. I set both fields (tagID and tagname) to be unique, but the only result was that when trying to enter an existing tag a warning dialog pops up that prevents the creation. Which is absolutely correct, but not what I want.


Is there a way to tell FileMaker to create an entry in the link table with an existing tagID instead of trying to create a duplicate in the tags-table?


My only solution yet is with an additional global database field in the images table called newtag, that after entry triggers a script (when leaving) that does all the checking and creation. This is working but I don't really like it, because

a) it feels cumbersome

b) the entry field for newtag has to have a static position and does not move down like the entry field inside the portal

c) loses focus after creation


I have a feeling that there is an option to tell FileMaker how to handle the automatic creation, but I can't find it.


Any suggestions welcome?