Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > FusionPro® VDP Creator

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 23rd, 2022, 08:33 AM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 43
Default Sequential in Ranges

I'm trying to create ticket covers that will print what ticket numbers are in each book. Each book has 7 tickets. Ex. book 1.(815255 TO 815261) book 2. (815262 TO 815268) book 3. (815269 TO 815275) and so on. I know how to use the numbering rule, but I need to skip the numbers in between. I found this on another post but don't know how to apply a specific start number and in increments of 7.

return FormatNumber("000000", (CurrentRecordNumber() - 1) * 100 + 1) + "-" + FormatNumber("000000", CurrentRecordNumber() * 100);
Reply With Quote
  #2  
Old March 23rd, 2022, 10:59 AM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
 
Join Date: Feb 2011
Posts: 233
Default Re: Sequential in Ranges

This might help break it down for you:

Code:
var start_number = 815255;
var increment = 7;

var crn = CurrentRecordNumber() -1;
var set_start = start_number +crn +(crn * increment);
var set_end = set_start + increment;

return  set_start + "-" + set_end;

Last edited by ThomasLewis; March 23rd, 2022 at 11:29 AM.. Reason: Simplified the code a little bit so it's easier to understand
Reply With Quote
  #3  
Old March 25th, 2022, 04:34 PM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 43
Default Re: Sequential in Ranges

Thank you, this is exactly what I needed.
Reply With Quote
Reply

Tags
ranges, sequential numbering

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.