2 Replies Latest reply on Oct 27, 2009 1:44 PM by JeanneV

    Forcing a Record to use a Specific Layout

    JeanneV

      Title

      Forcing a Record to use a Specific Layout

      Post

      Is there any way to make FMP10 force each record to use a specific layout every time it is opened?

       

      I was able to create a script that gets the text from a field and if a layout exists for this retrieved text, it will load the proper layout.  If no text exists that matches a layout name it loads a "blank" layout.  This solution works fine by using a scripted button to "get layout". 

       

      My question is; is there a way to automate that process across the board so every record, every time it is opened, will retrieve the proper layout based on the data in a field?

        • 1. Re: Forcing a Record to use a Specific Layout
          philmodjunk
            

          You can use a layout based script trigger for this: OnRecordLoad.

           

          The trigger can run your script that determines which layout to select for the current record. On each layout where you set this trigger, clicking through the records will automatically trigger the script.

           

          Be careful, layout based script triggers may affect the function of other scripts in unexpected ways. If you have another script, for example, that uses the same layout to move from record to record, it will also trigger OnRecordLoad events which will, in turn, trigger the same script.

           

           

          • 2. Re: Forcing a Record to use a Specific Layout
            JeanneV
               Beautiful solution, thanks so much for your prompt reply Phil, much appreciated.