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


Thread Tools Search this Thread Display Modes
Old July 29th, 2015, 10:12 AM
ericalynplante ericalynplante is offline
Forum n00b
Join Date: Jan 2013
Posts: 3
Default Linked Text Boxes in OnRecordStart


Has anyone out there has found a way to adjust Linked Text Frames in the OnRecordStart rule or any other rule?

I have 3 linked Text Frames that have continuous text flowing through them. When I linked the text frames, the program applied the same name to all three. However, when I add the code to my OnRecordStart rule to adjust the y coordinate for the text frames with that name, it will only move the first box in the series.

Example: (moving frames 1 inch down on the y axis)

var ExFrame = FindTextFrame("Example Text");

if (Field("SampleField")== "Yes"){
ExFrame.y = (ExFrame.y) + (1 * 7200);


P.S. 1 text box with multiple columns are not an option.
Reply With Quote
Old July 29th, 2015, 10:53 AM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,671
Default Re: Linked Text Boxes in OnRecordStart

I'm not sure I would call this a bug, but it is a design limitation. As you've figured out, when you name a text frame, what you're really doing is naming a text flow, which can contain multiple frames. And as the name of the FindTextFrame function suggests, it locates the first frame in the text flow with the given name. So you can't change the properties of any frame in a multi-frame text flow, other than the first frame, with JavaScript rules. (Although you can suppress the entire text flow.)

I'm frankly not even sure what a JavaScript function to return, say, the third frame in a named text flow would look like. Maybe FindTextFrame("Example Text", 3)? Or maybe a function like FindTextFlow which would return an array of frames? The point is that this feature was simply not designed to work in such a case; it was designed to work for the 95 percent of jobs which don't connect multiple text frames together into a flow, and the subset of those which simply need to modify single frame flows.

If you want to be able to modify all of the frames on a page, or even add new frames, including frames from multi-frame text flows, chart frames, text on a curve frames, and even modify the clipping frames for graphics separately from their actual graphic scaling frames, then you need to use the DIF Control API with FP Server. This is one of the selling points of extra functionality that you get with FP Server compared to Desktop.

However, you have other options as well. One thing I've seen people do in FP Desktop jobs, even before the ability to move text frames in JavaScript was added, is to use tables, and to insert empty rows and columns with specific depths and widths, in order to effectively move the table cell with the actual contents to an arbitrary position on the page. You could also accomplish the same thing with tagged markup, simply by adding blank lines (with a specific amount of leading) for the vertical offset, and using indents (in <p> tags) for the horizontal offset. Of course, it's not easy to flow from one table cell to another like this, or to know where to break up the text to add blank lines, so you would probably also need to do some text measurement to figure out where to break up the text into the different "frames."

If you just want to move all of the frames as a unit, say, to move them all one inch down on the Y axis, then you could put all of those frames onto a Template page, which you could then call out as an FPRepeatableComponent in a text rule, which you could then use in a single frame on the Body Page. Then you can use FindTextFrame to locate and move just that single Body Page frame which contains all of the frames from the Template (repeatable component) page. The Template page can contain a mix of text, graphics, and anything else. That's probably your best bet right there.
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral

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
Old July 29th, 2015, 11:15 AM
ericalynplante ericalynplante is offline
Forum n00b
Join Date: Jan 2013
Posts: 3
Default Re: Linked Text Boxes in OnRecordStart

Thank you, Dan!

Those are some great options to consider. And yes, I agree, it is a design limitation not so much a bug. I had a feeling that it wasn't something that is used often in FusionPro. It is actually a relief to know that I was not, in fact, missing something obvious. Again, thanks!
Reply With Quote

link tool, onrecordstart, rules, text box

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 10:17 AM.

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