rcacciato Posted July 1 Posted July 1 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.
comment Posted July 1 Posted July 1 It is hard to understand what your script is supposed to do. It seems to me you are using the Perform Find/Replace [] script step instead of Perform Find []. But I could be wrong.
rcacciato Posted July 1 Author Posted July 1 (edited) That was it. Simple as that. Can't believe I missed that. Thanks so much! Edited July 1 by rcacciato
comment Posted July 1 Posted July 1 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.
rcacciato Posted July 2 Author Posted July 2 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.
comment Posted July 2 Posted July 2 1 hour ago, rcacciato said: I haven't found any reference to that in the FM documentation. https://help.claris.com/en/pro-help/content/using-variables.html https://help.claris.com/en/pro-help/content/set-variable.html
rcacciato Posted July 2 Author Posted July 2 OK I'll review and digest this. You've been most helpful. Thanks!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now