February 1, 200124 yr Hi. I'm in a position where I have a DB that has multiple uses, with only slight tweaking of each layout. Is there a way to automatically associate a layout with a record so that FileMaker will change layouts when browsing from record to record? It would be easy to associate a record with a layout by using a value list and a script, but how can I make FileMaker execute the associated script when browsing? jeff
February 1, 200124 yr Yes! You'll need to disable navigation to "next record" and "previous record" by all other means except a script (lock the status bar, etc.). Any script which changes what record is the current record will need to include a call to a subscript which tests: If (Record Type = 1) Go to Layout (Layout 1) End if If (Record Type = 2) Go to Layout (Layout 2) End if . . . Where the record types and layout names are yours to determine. Again, the key is that every way of changing a record must be accounted for. This will include a startup script when the file is first opened, not allowing a "Show All", not allowing a command-E delete, not allowing a command-F find, etc. EVERYTHING that changes what record you are on must be handled with a script that calls the layout selection subscript. -bd [This message has been edited by LiveOak (edited January 31, 2001).]
February 1, 200124 yr Author Brilliant! Thanks a lot! Although I still wish FileMaker had this built-in, I'm glad that ScriptMaker is full-featured enough that this workaround is possible.
Create an account or sign in to comment