3 Replies Latest reply on Jan 25, 2011 1:10 PM by philmodjunk

    Radio butons or custom dialogue box?

    paintboothguy

      Title

      Radio butons or custom dialogue box?

      Post

      Hello Forum, 

      I have a two-page layout called "confirmation" that gets compiled as a PDF and emailed to a client.

      Recently, I have found that this 2-page layout needs to be faxed instead of emailed, in which case it should be a 3-page layout (the first page now being a fax cover sheet.)

      I wrote a script to address this issue:  The first step in the script that will generate the 2-page layout looks to see if a radio button set says "Email", in which case the normal 2-page layout is populated and saved as a PDF.

      If the radio button set says "Fax", I guess I'll have it populate a BRAND NEW layout that contains 3 pages, the first being a fax cover sheet.

      Does this seem like a good, simple solution?

      Is there a way to accomplish this with a dialogue box that forces a user to push an "Email" or "Fax" button, thus navigating to and populating the correct layout?

      Thanks!

      Andrew

        • 1. Re: Radio butons or custom dialogue box?
          philmodjunk

          Show Custom Dialog would seem the simplest approach here. That option gives you up to three buttons, so you can set up the buttons to read Email, Fax and Cancel if you want. Get ( LastMessageChoice ) will return the number of the button clicked.

          And it's possible to use a single layout for both Email and Fax formats also...

          • 2. Re: Radio butons or custom dialogue box?
            paintboothguy

            Phil, 

            Thanks <Get ( LastMessageChoice )> was the piece of information that I needed.  I agree that  a custom dialogue box would be best.

            How would you suggest I "use a single layout for both Email and Fax formats also..."?

            Thanks!, 

            Andrew

            • 3. Re: Radio butons or custom dialogue box?
              philmodjunk

              There are several options.

              If your report is always 2 pages plus the fax cover page, create a TitleHeader layout part and make it one page tall. Put your fax cover page inside this new layout part. When you save as PDF, specify pages 2-3 for email and pages 1-3 for fax. (After adding the Save Records As PDF script step, click specify options, then click the options button in this dialog to get to a dialog where you can specify a page range.)

              If the number of possible pages varies, then a different approach can be concocted that places the cover page inside a sub summary part that sorts on a field for which all records have the same value. To show the cover page, you sort on this field, to hide it you sort with a sort order that does not include this field.