Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 5th, 2016, 02:54 PM
Florida_ssp Florida_ssp is offline
Forum n00b
 
Join Date: Jan 2016
Posts: 2
Default Sequential numbering rule, with a twist

Hi, I am pretty new to FP, and know very little coding. I have a project. On each page there are three numbers, sequential. Page two continues with the numbering.
So, Page one has 4001, 4002, 4003. Page 2 has 4004, 4005, 4006 and so on. I've been creating an excel spreadsheet with three columns of the proper numbers. Works fine.. however.. is there a way to create a numbering rule for future use that skips every two numbers?
Reply With Quote
  #2  
Old February 5th, 2016, 03:20 PM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 957
Default Re: Sequential numbering rule, with a twist

If you're using FusionPro 8 or later, it's really easy. All you have to do is set a global variable in the OnJobStart callback rule to initialize the number. Like this:
OnJobStart
Code:
number = 400; // Edit this starting number if needed
Then you create a text rule:
Code:
return number++;
Make sure "Re-evaluate this rule for every text flow" is checked. That's the most important step because that makes FusionPro run the rule for every text frame it's called in. So, every time the rule is called, it increments 'number' by 1. Your first text frame will show "401", the second will show "402" and so forth throughout the job.
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #3  
Old February 8th, 2016, 09:18 AM
Florida_ssp Florida_ssp is offline
Forum n00b
 
Join Date: Jan 2016
Posts: 2
Default Re: Sequential numbering rule, with a twist

Worked perfectly! Thanks so much! Woot!
Reply With Quote
Reply

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 08:39 PM.


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