AnsweredAssumed Answered

Relationships and portals

Question asked by AshleyWard on Aug 8, 2011
Latest reply on Aug 9, 2011 by philmodjunk


Relationships and portals


Hello all... this is my first post - I'm a FileMaker Pro newbie, but have many years programming experience and various SQL experience (although not an expert).  I'm a bit stuck with this latest thing I'm attempting with FMP (I recently purchased FileMaker Pro 11), I suspect because I just don't understand enough about relationships and portals.  Any help appreciated!

I'm trying to record the presence at each SITE of particular FEATUREs (eventually thousands of sites, but perhaps around 20 features).

For example, SITE_ID 23 might have FEATURE_ID 5 (cafe) and FEATURE_ID 6 (toilet).

I'd like this information to be accessible on the SITE layout. When that layout shows a particular site, I'd like it also to show a list of all possible features, with a checkbox by each one to show the presence or absence of that feature at that site.  If this were possible, I could then record the presence/absence of a feature with a single click.

Below is what I've tried, and it feels like I'm close - but perhaps I'm actually miles away.  Is the above actually possible/sensible with FMP?  How would I go about it?

I created a table for SITES, another for FEATURES, and a join table FEATURED (with columns SITE_ID and FEATURE_ID). (I thought it would be better to have a table listing possible features and use a join table rather than add a column to SITES for each feature, particularly as the list of features may well change as time goes on.)

I created a second TO called ALL_FEATURES, with relationship SITE_ID x FEATURE_ID.  I added a portal to the SITE layout, showing related records from ALL_FEATURES.  Great - it shows a list of all possible features.

But now I'm stuck at how to show the checkboxes. Each checkbox (on the SITE layout, within the ALL_FEATURES portal) should show whether a row (SITE_ID, FEATURE_ID) exists in FEATURED (SITE_ID from the SITE layout, FEATURE_ID from the portal row). But I can't see how to do this - in fact I suspect that it isn't possible to do this with a portal?