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 October 27th, 2017, 04:14 PM
Kim Kim is offline
Regular Contributor
 
Join Date: Sep 2008
Posts: 69
Default How to set multi-line to every 6 records?

I haven't used the new multi-line feature yet. I have a database of 10,000 or so codes and I need 6 codes per press sheet layout.

I can't use any of the defaults like 'changes' or 'starts with' because each code is unique. But I figure there's a way to say every 6 records? Probably by choosing 'matches'?

Hope that makes sense. Basically, I need to have 6 fields on each press sheet. I have a database with one code per record right now. I've been massaging the data to have 6 tab-delimited codes per record and can continue that way, but wanted to try the new multi-line and thought this is a good case for it.

Thanks,
Kim
__________________
Fusion Pro Desktop 10.0.16 & Server • Acrobat Pro DC • Mac OSX 10.12
Reply With Quote
  #2  
Old October 27th, 2017, 06:31 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,408
Default Re: How to set multi-line to every 6 records?

I don't think the multi-line record feature is what you want. That's usually for a statement-type job, where the multiple lines of data are go into a table or some other kind of tabular format.

When you say, "6 codes per press sheet," that sounds to me like an imposition job.

Instead of using a body page set to the final sheet size, your FusionPro template should have page sized for just one record (or "code"). Then in FP Imposer, you can set up an imposition template for that page size, either by clicking the Load button or by setting the Finish Size. Then on the Press Sheet tab, you can set the final press sheet size, and on the Layout tab, set up a 6-up simplex imposition, with horizontal and vertical repeats of 2 and 3 (or vice-versa). Then you can save that FPI file and assign it to the FusionPro job on the Imposition tab in the Composition Settings.

If all that's going on the press sheet are the "codes" you mention, then you shouldn't need any JavaScript code at all to accomplish this.

If you do need some other content on the sheet besides the "codes," you can use the custom imposition sheet background feature, which is documented in the section titled "Imposition Background Sheet" in the FusionPro Rules Guide. There's also an example here:
http://forums.pti.com/showpost.php?p=11530&postcount=3
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #3  
Old October 27th, 2017, 08:51 PM
Kim Kim is offline
Regular Contributor
 
Join Date: Sep 2008
Posts: 69
Default Re: How to set multi-line to every 6 records?

Thanks, Dan. I should have been clearer. I understand what you mean and do jobs like that most of the time.

But this is a layout that has to be a full press sheet layout because it's a special die cut with specific folds and perfs and certain sections that don't have variable and can't be repeated the way you envision.

I haven't played with multi-line at all yet. I should have investigated better instead of just hoping that it could mean there was a way to stipulate that every 6 or 8 or 10 lines in a db are one record. Writing this out makes me realize I hadn't fully thought it through b/c for what I'm doing, specific fields are needed.

I'll continue managing my data into the number of fields per record that I need and do better investigation into multi-line to figure out more appropriate future use.

Thanks for the info.
__________________
Fusion Pro Desktop 10.0.16 & Server • Acrobat Pro DC • Mac OSX 10.12
Reply With Quote
  #4  
Old October 30th, 2017, 10:22 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: How to set multi-line to every 6 records?

If you wanted to, you could make a global array containing all of your codes in an OnJobStart callback and then splice off the first 6 codes in that array and print them on every 6th record:

OnJobStart
Code:
allCodes = [];

var fieldName = "Codes"; // Field name containing the codes.
var data = new ExternalDataFileEx(PrimaryInputFile(), FusionPro.inputFileDelimiter);
for (var i=1; i<=data.recordCount; i++)
    allCodes.push(data.GetFieldValue(i, fieldName));
Codes (text rule)
Code:
if (FusionPro.inValidation) 
    Rule("OnJobStart");

var codesPerRecord = 6;
var codes = (FusionPro.Composition.inputRecordNumber % codesPerRecord) == 1 ?
    allCodes.splice(0, codesPerRecord) : [];
return codes.filter(String).join("<br>");
Using the above code, codes for records 1-6 would be printed on the first record, codes 7-12 would be printed on the second record, et cetera.

Is that what you're trying to achieve?
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #5  
Old November 17th, 2017, 11:24 AM
Kim Kim is offline
Regular Contributor
 
Join Date: Sep 2008
Posts: 69
Default Re: How to set multi-line to every 6 records?

Hi Ste,

Realized I never replied to you and didn't want to be rude! That's some cool info you supplied and I appreciate it - I'll bank it for future when I'm sure it will come in handy.

My job die cuts, perfs and folds into an accordion like book of tickets. Our layout is the entire press sheet and we place the 6 fields in specific places on that layout (can't do imposition as Dan was envisioning and as I'd normally do due to the design of the piece - parts of it are info based without any variable info).

Each ticket in the book has a barcode printed on it. So during this discussion I've realized there just really have to be 6 fields in order to designate each code to a different ticket/area of the layout. We get a database of all codes in a single field and I've been reflowing that single field database into one with 6 fields.

I had a fantasy when I heard multi-line that it could somehow magically parse every 6 records into 6 fields and let me put each on a different ticket since I hadn't really investigated multi-line and what it's good for. I should have done some research like I usually do, instead of just immediately posting here.

Thanks again for the info though. You always have helpful code and ideas and I appreciate learning javascript solutions from you and Dan!

-Kim
__________________
Fusion Pro Desktop 10.0.16 & Server • Acrobat Pro DC • Mac OSX 10.12
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 07:25 AM.


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