1 Reply Latest reply on Oct 10, 2014 4:41 AM by Mike_Mitchell

    Help please - customisations for my Not-for-profit


      Hi there - very new to Filmaker Pro & need to add in some customisations for my Not-for-profit. I am hoping to just use the contacts solution, but want to be able to assign multiple keywords to each contact to make it easy to pull up different lists for different marketing applications. Im hoping someone will be kind enough to help me work this out?



      I've attached a pic to show what I mean as the keyword - the other info on the pic is another compnaies, so not required. Just a basic solution template is fine for our needs

      Many thanks,


        • 1. Re: Help please - customisations for my Not-for-profit

          Hello, Tracey. Welcome to FileMaker.


          The solution you've displayed is using the correct structure for accomplishing what you want. It's called a join table, meaning it "joins" two entities (other tables) together. Each record in the join table represents a connection, and will have, at a minimum, the primary key field (or ID) of the two parent tables. In this case, the join table will have the key field from the contact (perhaps contact ID?) and the keyword (keyword ID?) stored in each record.


          Which version of FileMaker are you using? I don't have 13 where I am at the moment, but the starter solution for Contacts in 12 didn't have a Keywords table. So you'd need to add it, along with a Contact_Keywords_Join (or whatever you want to call it). Managing the joins requires a bit of work, using some scripting:


          1) To create the join record from the current contact, you'd want to store the contact ID and selected keyword ID in variables, navigate to a layout based on the join table, create the new record, and store the IDs in the correct fields. Then move back to the original layout. (More sophisticated: Check to see if that combination of keyword and contact already exists to prevent duplicates.) There are ways to select the desired keyword directly in the portal using pull-down lists, but if you're going to have a portal with the keywords available, IMHO, it's better to use a script.


          2) If you want to have a "click to find" function (like the sample you provided), that would be another script. Not too hard; you just store the selected keyword ID in a variable, switch to Find mode, insert the ID into the join table's keyword ID field, and perform the Find. You should probably use a bit of error trapping (Set Error Capture to "On" and check to see if you get an error, or just make sure you have a found set using Get ( FoundCount )) in case there aren't any records that have the selected keyword assigned. Or, alternatively, you can just allow people to perform their Find directly in the portal (use the Keyword field from the Keyword table and set the field in the Inspector only to allow entry in Find mode).


          3) Deleting a join record isn't too hard; you can just have a button like your sample that uses the Delete Portal Row command. Alternatively, for a bit more sophistication, you can use a script that checks for user privileges and provides a bit more customizable messaging to the user.


          Hope that helps. Please feel free to ask additional questions if this doesn't make sense.