Plusautomatisering Posted August 6, 2013 Posted August 6, 2013 Hello, I have one layout (1 record) when i'll print i'll choose the amount of papers i want to print. is it possible to add page numbers on my labels. I've already tried get (pageNumber) but it shows on all labels 1.
eos Posted August 6, 2013 Posted August 6, 2013 You mean you're printing multiple copies of a one-pager, and you want to print the number of the copy on the page?
eos Posted August 6, 2013 Posted August 6, 2013 You could place a global variable ($$) on the layout, then print 1 copy within a loop (number of desired copies), each time changing the $$ with the current loop counter. FileMaker calls this a Merge Variable, analogous to a Merge Field, and it works just the same (as of FileMaker 11+). Note that this may not be a practical/feasible solution, depending on the number of desired copies. That being said, a script would look like so: Set Variable ( $numOfCopies ; 10 ] // you can hard-code this, or read it from a global field before starting the print script # if you do the latter – like in Set Variable [ $numOfCopies ; myTable::myNumOfCopies ] - check that there is a value, or you've got yourself an infinite loop # e.g. If [ not $numOfCopies ], Exit Script [], End If [] # Go to your print layout, make necessary set-ups etc. Loop Set Variable ( $i ; $i + 1 ] // that's your loop counter Set Variable ( $$copy ; "Copy #" & $i ) // the global variable for your layout Print [ No dialog ] // set print dialog to print 1 copy only Exit Loop if [ $i = $numOfCopies ] End Loop Set Variable ( $$copy ; "" ) // clean-up; you only need the $$ while printing
Recommended Posts
This topic is 4184 days old. Please don't post here. Open a new topic instead.
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