AnsweredAssumed Answered

How do I Show Different Fields in a Portal based on a Type Field? (or at least make it look that...

Question asked by Brackintosh on Sep 30, 2011
Latest reply on Oct 3, 2011 by philmodjunk


How do I Show Different Fields in a Portal based on a Type Field? (or at least make it look that way)


Looking for ideas on the best way to handle this example situation:

I have a Project record (parent) that contains a lot of information. One small portion of that info is a media portal that can show information about Music, Video or Books. Only one type of Media can appear for a project and there is a Media Type field that defines this. Some of the information about the media is common (Title, Year, etc) and other differs by type. For example, Music has an Album, and length field; Video has director and format; Book has ISBN and a Illustrated checkbox.

From a user interface standpoint, there needs to be a single Media List tab that shows a portal listing the music, video or books that pertain to the project. The information shown in list view should be specific to the media type of the project, so you would see different columns in the portal view depending if you were looking at books, video or music. The media record will contain many more fields, so no data entry will be done directly on the portal row.

How do I do this in FM Pro? My thoughts:

1) Have a single related Media table that contains all of the common and type specific fields. Then show different layouts based on the media type, so the user see different information for each type. For the portal, any type specific fields that need to appear in the list mode would be calculated based on type. For example, the ListItem1 field might contain the Director for a video and the ISBN value for a book. Header values would have to be calculated as well.

2) Have three different related tables, one for each media type. Each portal would appear in a tab on the Project layout. Then I would use the zero width portal trick (which I've never used) to hide the other two tabs based on Media Type.

3) Have three Project layouts that switch based on the media type. (The project layout is pretty involved and I'd prefer not to have to make any changes three times, but perhaps it could be managed pretty well via the duplicate layout option.) In this case, which approach would be better - one related table with fields for all three types of media or three separate tables?

Any thoughts on which is the preferred method or am I missing the obvious simple solution. Any help most appreciated!