Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

n of n Pages Based on Value

Featured Replies

  • Newbies

I am trying to make a report that would print a certain amount of pages based on an entered number and also show the # of #.

For example, if I enter a value of 4 in a field I would like to print out 4 pages and have each page show the # of # value (1 of 4, 2 of 4, 3 of 4, 4 of 4).

Any help would be appreciated!

Thanks!

  • Author
  • Newbies

I should probably clarify what I am trying to do here...

I am trying to print box labels that will for example print box # of # on the label (box 1 of 3, 2 of 3, etc...) the number of boxes needed will come from a calculation (total pcs divided by how many pcs fit in a box) then I want to generate the amount of labels I need.

Any help would be appreciated!

Thanks

Hi there and welcome to the forums

set up 2 global fields, box no and no of boxes.

Your print script structure should then be something along these lines

Set field No of boxes; (Ceiling(total pcs/no of pieces per box)+1)

Set field box no; No of boxes

Loop

Do your print routine

set field No of boxes;No of boxes-1

exit loop if No of boxes = 0

end loop

This script will calculate the number of boxes that you need (the ceiling function+1 will account for any 1/2 empty boxes that are needed and count them as 1) and will print out as many sheets/lables as you need, allowing you to use the two fields on the printout

HTH

Phil

  • Author
  • Newbies

Thanks Phil, I'll try this out!

  • Author
  • Newbies

How can I get the # of # BOXS TO PRINT ON THE LABELS?

THANKS!

Create a layout with the two globals in position were you want them to be

Phil

  • 1 month later...

How would you add script to print a field "Inv Encl" on the 1 of n box label?

No worries, I sorted it. :)

Include another global field called inv encl

Set Field [box number; box total]

Set Field [inv encl;""] (this clears any previous print of inv encl)

Loop

Print [Restore;No Dialog]

Set Field [box total;box total-1]

If [box total=1]

Set Field [inv encl;"Inv Encl"]

End If

Exit Loop If [box total=0]

End Loop

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.