2 Replies Latest reply on Dec 31, 2014 7:49 AM by Mark_M

    How to leave layout mode by button



      How to leave layout mode by button


      I've created a print layout where I want to offer the user the possibility to change the letter's content.
      To make it a little consistent with other buttons, I've created a button that enters into layout mode.

      Using following script the command works:

      tell application "Filemaker Pro Advanced" to activate
      delay 0.1
      tell application "System Events" to tell process "Filemaker Pro Advanced"
          keystroke "l" using command down
      end tell

      Now I would like to have a similar button to go back to browse mode. But that doesn't seem to work in Layout Mode.... Any suggestions please? Or is my approach wrong and is it possible to make only the text editable for the user?

        • 1. Re: How to leave layout mode by button

          I would suggest using a different approach.  Create a layout with fields that are editable, then place these fields as merge fields on your print layout. http://www.filemaker.com/help/html/create_layout.9.23.html

          • 2. Re: How to leave layout mode by button


            I take it that's an AppleScript that launches FM and then enters layout mode.

            My suggestion would be to rethink your solution to leverage the functionality within FM.  When the user it modifying the layout, then that becomes the next layout used for the next "letter".  Some examples:

            Create a "Data" table and layout (Named as you need it), this is where various pieces of data are inputted (Name First, Name Last, Name Prefix, various address fields, phone, email, etc.).  Then create standard layouts as letter templates where the data is merged into the letter.  You could have fixed layouts for letters that don't change and different layouts for letters that are pretty standard but have the ability for the user to input a "custom" paragraph in the Data Entry layout.

            Another way would be to have a data entry layout and then a letter layout with standard openings and closings.  You then select a script to populate a "Body" field with preset text.  Once the body was set by script you could then make that available for changes by the user.


            Just a couple of thoughts, directly editing the layout for each time the database is used might not be the best road to go down.  I do employment letters and contracts for my organization which currently includes 22 different standard documents and one that the Compensation Analyst can use which produces a generic format (Header, opening, signature section, and footer) - she then inputs the "body" in a special tab on the data input layout.  She can then Preview and Print as needed.