Jump to content

Recommended Posts

Posted

I have a script that finds records with certain parameters in order to print them. Here's the script (I numbered the lines to make it easier):

Select for printing script

1 Perform Script [ “go to live airports” ]
2 Go to Layout [ “Select Airport” (airports) ]
3 Sort Records [ Keep records in sorted order; Specified Sort Order: airports::iatacode; ascending ] [ Restore; No dialog ]
4 Pause/Resume Script [ Indefinitely ] Copy [ airports::iatacode ] [ Select ]
5 Go to Layout [ “order detail” (qrgen) ]
6 Enter Find Mode [ ]
7 Paste [ qrgen::airport_code ] [ Select ]
8 Set Field [ qrgen::unprinted; 1 ]
9 Go to Layout [ “orderlist” (qrgen) ]
10 Perform Find/Replace [ Search operation: Find Next; Search settings: Forward; Search across: All records/requests; Search within: All fields ] [ No dialog ]
11 Beep
12 Show Custom Dialog [ Title: "Print Envelope Labels"; Message: "1. Click OK then hit return to perform find 2. Select number of records to print at top of screen
13 Click on 'Print Envelope Labels'
14 Mark as printed when labels are printed"; Default Button: “OK”, Commit: “Yes” ]
15 Exit Script [ ]

For some odd reason, when it gets to step 10 the find doesn't perform automatically--I have to hit return. I can't for the life of me figure out why it doesn't just do the search. Any ideas?

Thanks in advance.

Posted (edited)

That was it. Simple as that. Can't believe I missed that. Thanks so much!

Edited by rcacciato
Posted

Good.

Side note:
Do not use copy/paste in your scripts to transfer values from one location to another. For one thing, it destroys the user's clipboard. For another, it requires the fields to be on the current layout. Instead, use a script variable and then set the field to the variable.

 

Posted

Thanks for this. How does one use a script variable? I haven't found any reference to that in the FM documentation.

Sorry if these are such basic questions, I'm grateful for your help.

Posted

OK I'll review and digest this. You've been most helpful. Thanks!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.