Go Back   MarcomCentral (PTI) and FusionPro User Communities > Support > Issues, Questions, Etc.

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 9th, 2022, 01:00 PM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 43
Default Repeating Sequential Ranges Rule

I need a rule for Sequential numbering in ranges of 6 increments that repeats until a specified range ending (1001-146000). I will use a Overflow template until the pages are filled with the repeating range. How do I repeat the rule on the same page until it's filled within the text box?



for example:


1001-1006
1007-1012
1013-1018
etc. filling the rest of the page down, then overflow to the next page and continue where it left off.



My current Sequential Incremental Rule looks like this:


var start_number = 1001;
var increment = 6;

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

return set_start + "-" + set_end
Reply With Quote
  #2  
Old June 10th, 2022, 11:44 AM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
 
Join Date: Feb 2011
Posts: 233
Default Re: Repeating Sequential Ranges Rule

Give this a shot:

Code:
var start_number = 1001;
var largest_number = 146000;
var range = 5;
var sequence = "";

while (start_number +range <= largest_number)
{
    sequence += start_number + "-" + (start_number +range) + '<br>';
    start_number += (range +1);
}

return sequence;
Reply With Quote
  #3  
Old June 10th, 2022, 01:33 PM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 43
Default Re: Repeating Sequential Ranges Rule

Thomas,


Thank you for your reply. That worked great! but I had to change the range to 4 to make it work the range I needed. For some reason when I compose the job all the pages turn out the same and not continuous. I have the Text frame on the body page marked as overflow and the 2nd page set up as an Overflow template. I have attached my collected file. Can you take a look and see what I'm not doing correctly?
Attached Files
File Type: zip 158789-1_Log_Book_FP.zip (1.63 MB, 2 views)
Reply With Quote
  #4  
Old June 10th, 2022, 02:47 PM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
 
Join Date: Feb 2011
Posts: 233
Default Re: Repeating Sequential Ranges Rule

You need to remove the rule from the text frame on the overflow page, then in the text frame properties palatte, turn on the checkbox that says "Overflow To".

Also in your Composition Settings under Input, change the Record Range to All or 1 to 1.
Reply With Quote
  #5  
Old June 14th, 2022, 08:45 AM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 43
Default Re: Repeating Sequential Ranges Rule

Thank you very much. It works great now. I was missing the checked box on the Overflow template. I appreciate your help!!
Reply With Quote
  #6  
Old June 15th, 2022, 07:25 AM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 43
Default Re: Repeating Sequential Ranges Rule

I ran into a snag.


I need to edit the rule to include tabs, but when I do and send to compose the server gets to 95% done and just hangs. I let it set all night but it didn't complete. It looks fine in the preview. Is there an easier or more efficient way to put tab stops in the rule. I have the tab stops defined in the text editor, under the tabs. I have also attached my revised setup with a screenshot of the preview.



Here's my rule with the tab tags added:


var start_number = 6001;
var largest_number = 87000;
var range = 4;
var sequence = "";

while (start_number +range <= largest_number)
{
sequence += start_number + "<t>-<t>" + (start_number +range) + '<br>' + "<t>";
start_number += (range +1);
}

return sequence;
Attached Files
File Type: zip 158789-1_WIC_Log_Book_FP.zip (1.39 MB, 4 views)
Reply With Quote
  #7  
Old June 16th, 2022, 06:48 AM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 43
Default Re: Repeating Sequential Ranges Rule

Just a Note…


To try to simplify things, I tried to make two separate rules to overflow (getting rid of the tabs), but apparently you can't Overflow to two text frames onto the "Overflow" template Page.
Reply With Quote
  #8  
Old June 16th, 2022, 11:51 AM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
 
Join Date: Feb 2011
Posts: 233
Default Re: Repeating Sequential Ranges Rule

I am having the same issues at 95% I think the amount of overflow going on just may be too much to handle.

I took a different approach. Removed the overflow completely and moved everything into OnRecordStart. Take a look.
Attached Files
File Type: pdf 158789-1_WIC_Log_Book_FP.pdf (38.9 KB, 2 views)
Reply With Quote
  #9  
Old June 16th, 2022, 02:22 PM
LyndaEngelage LyndaEngelage is offline
Junior Community Member
 
Join Date: Sep 2014
Posts: 43
Default Re: Repeating Sequential Ranges Rule

That worked perfectly, thank you very much!!
Reply With Quote
Reply

Tags
overflow, sequential ranges

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:13 AM.


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