2 Replies Latest reply on Nov 24, 2010 2:22 PM by jhurley

    Print Layout based on User Feedback

    jhurley

      Title

      Print Layout based on User Feedback

      Post

      I have a simple database for printing labels.  I want to create a script that will ask the user what type of label they would like to print and then select that layout and proceed with the print job.

      Here is what I had in my head for a script.

      Dialog Box [Small, Medium, Large]

      Perform Find

      Go to Layout [Layout based on User Feedback from Dialog Box]

      Print Setup

      Print

      Go To Layout [Original Layout]

      Show All Records

        • 1. Re: Print Layout based on User Feedback
          philmodjunk

          First try it without the dialog box, we can add that enhancement later.

          Define a global text field, gLabelType.

          Put it on a layout and format it with a value list of the label layouts.

          If you want, you can add global fields to this layout for the user to enter/select criteria for the find also.

          Your script:

          Perform Find[Restore] 
          // or use Enter Find Mode[] with a series of set field steps to specify find criteria from the global fields I suggested,
          // then use Perform Find[]
          Go To layout [YourTable::gLabelType]
          // Use layout name by calculation and name your layouts with the same names as your value list.
          //put your print steps here...

          There are other variations possible but that should get you to step one.

          The layout where you put your global field can be used with a new window script step to pop up a dialog type window. You could also use Show Custom dialog, but then you can't use a value list for the types of labeles.

          For example code on how to pop up a dialog like this, check out the popups in my Known Bugs List file. If you use code from this example, be careful to leave out or disable the Allow User Abort[off] step until you have everything working and buttons in place that halt the paused script that first opened the window. Otherwise, you can get trapped in a loop with force quitting FileMaker as the only way to get out of it.

          • 2. Re: Print Layout based on User Feedback
            jhurley

            Thank you so much.  It worked like a charm.  What a great idea.