October 26, 201114 yr Hi, I know my basic scripts but am far from being able to add all the permutations and combinations when users don't do exactly as you expect them to... but am super keen to learn! Let me start here. I have a script that sets the print setup, enters preview mode and then takes the user to the print dialogue box. If the users presses 'cancel', filemaker shows 'Print has been cancelled. Do you wish to continue with the script'. I Users might be totally flustered with this dialogue. What do I need to add to my script in order to take them back to browse mode? Thanks so much,
October 26, 201114 yr Is it necessary for users to have access to the print dialog box? Could you not determine the print setup up in an earlier part of your script so that when the user has previewed what the report will look like they then have the option to print or to cancel? Something along the lines of: Start your script with Allow user abort [off] and Set error capture [on] Gather the data for the report according to the criteria you set; set up report page numbers, etc Go to the print layout Enter preview mode [pause] Show custom dialog - Print or cancel If [get last message choice] = 1 Print End if Go to original layout Enter browse mode
October 26, 201114 yr if you set error capture on, right after the print command that brings up the dialog you can do the following: if [ Get ( LastError ) = 1 ] Go to Layout [ original layout ] Enter Browse Mode [ ] Exit Script [ ] End If
October 26, 201114 yr Author Thanks a million. Extremely helpful. Its always easy when you know how! have a great day!
Create an account or sign in to comment