Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5094 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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

Posted

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.

This topic is 5094 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.