methogod Posted November 6, 2017 Share Posted November 6, 2017 Need an expression that will check if $inputrecord or number is a multiple of 50. if true then return "BookNumberCount" (which should go up for each booklet) Trying to do this without using stacks. So every 50 ouputsheets/records, i want to print BOOK# on each top sheet... already have background templates setup. My java is not strong. new to all this thanks for help... var certainNumber = 50; if ("$inputrecordnumber" % "certainNumber" === 0) { // directWinner is a multiple of certainNumber } then return "«$inputrecordnumber»" ***OR the correct name for OUTPUT COMPOSED SHEET**** Quote Link to comment Share on other sites More sharing options...
dreimer Posted November 6, 2017 Share Posted November 6, 2017 Does the "Book#" sheet count as one of the 50? If not, you could use the slipsheet option. Quote Link to comment Share on other sites More sharing options...
methogod Posted November 6, 2017 Author Share Posted November 6, 2017 slip sheets would mess up the NCR of the job (its a collated sets) Quote Link to comment Share on other sites More sharing options...
step Posted November 6, 2017 Share Posted November 6, 2017 If you want to print the book number on the first page of the book, then you aren't really trying to determine if the record is a multiple of 50. Record 1, 51, 101, etc aren't multiples of 50. I think you want to do this: var recsInBook = 50; var rec = CurrentRecordNumber(); return rec % recsInBook == 1 ? 'BOOK #' + Math.ceil(rec / recsInBook) : ''; Quote Link to comment Share on other sites More sharing options...
methogod Posted November 7, 2017 Author Share Posted November 7, 2017 That works... thanks... What if i wanted to make the same logic output a static image as well... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.