#1
|
|||
|
|||
![]()
I have some jobs that have differing quantities ordered. I can fit 1500 per box. I am trying to create a rule to determine how many cartons are needed for each order. So then my labels will say for example 1 of 1 or 1 of 2, etc.
I used this rule but am not sure how to have no decimal places and round to the nearest whole number. Code:
return Round((Field("Total Qty")/1500),0) Question: Is there syntax to round up for any fraction of a whole number? TIA
__________________
Don Reimer - JavaScript Novice MAC OS 10.14.6 Acrobat DC FP Creator 12.0.1 Last edited by dreimer; March 11th, 2015 at 08:59 AM.. |
#2
|
|||
|
|||
![]()
Suggest looking at this post here. It might help.
Math.ceil rounds up, Math.floor rounds down and Math.round rounds to the nearest integer.
__________________
David Miller FusionPro VDP Creator 12.0.3 Adobe Acrobat Pro 2021 macOS Big Sur 11.6.2 |
#3
|
|||
|
|||
![]()
Sorry when I searched the forums I saw the title rounding to the nearest 5 so I didn't think it applied. Lesson learned, look at the thread anyway.
Thanks this works perfectly.
__________________
Don Reimer - JavaScript Novice MAC OS 10.14.6 Acrobat DC FP Creator 12.0.1 |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|