December 9, 201015 yr I'm trying to do something that seems like it might be pretty common and ought to be fairly simple. Let's say I have a Table called Artworks and another Table called Keywords, which holds 1000's of records, a big lexicon of Art terms. I'm building a system where I can tag various artworks with any number of keywords. The tags will be kept in a join table between Artworks and Keywords. So, I would like to have a little textbox where the user can begin typing a keyword, and in a portal underneath, the Keywords beginning with the typed characters are displayed, and this list will get smaller as the user types. For instance, if the user types "pa" the filtered portal might show parade parrot pastel . . . and then if he types a further "r" the word "pastel" would disappear. My thought was to (1) create a filtered portal when there relationship betyween Artworks and Keyords is defined as: Artworks::Textbox = Left( Keywords::Word ; Length ( Artworks::Textbox ) ) and then (2) set a Script Trigger on the Textbox field "On keystroke" that simply performs a "Refresh Window; Flush cached join results; Flush cached external data". So, this isn't working. Is it the right idea but I'm missing a detail, or is my approach just wrong?
December 9, 201015 yr It cannot work the way you describe, because the matchfield on the child side must be indexed - and an unstored calculation cannot be indexed. Since you have version 11, you could use portal filtering (as opposed to filtering the relationship). But for the purposes of auto-completing an entry, there exists a much simpler solution: http://www.filemaker.com/11help/html/edit_layout.10.27.html#1029409
December 13, 201015 yr Author Oh -- right. Dang it, when I take a 3 month break from Filemaker I forget all sorts of basic stuff. Thanks for the reminder and pointer.
Create an account or sign in to comment