Go Back   PTI Marketing Technologies User Community > Software-Related Talk > Getting Started

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 23rd, 2015, 10:21 AM
PSU-GIT PSU-GIT is offline
Forum n00b
 
Join Date: Apr 2015
Posts: 1
Default Variable fields within variable paragraphs

I have been working this semester with the FusionPro 9.2 software with my students (On Macs). We have a question about how to create a type of variable text in a document. Can you help us with a question or can you forward my email to someone who can?


Here is what we are trying to do:



I want to make a postcard that has two different versions based upon school year of a student. If they are a freshman or sophomore, they get one paragraph, if they are a junior or senior, they get a different paragraph. In each of the paragraphs, I want to have variable fields. I have not been able to find a way to write a rule that will allow me to select the paragraph and to then edit the paragraph with the variable information. (At least that seems to be how I would do this.)



Here are the paragraphs showing placeholders where the variable info would go:



Copy for Junior/Senior Summer Football Camp – July 15-July 21:
<<Firstname>>, this summer it is time to “Get your Gorilla On!” Come learn from some of the best in the four states right here at Pittsburg State University. You’ll move from non-contact drills to full contact in a gradual progression, culminating with our final day “live” scrimmage. There will also be three-hour Specialty Clinics where you’ll receive personalized focused instructions as a <<position>> from experienced college coaches.
When you’re done scrimmaging on the field, we invite you to explore the <<Interest>> to round up the weekend and learn first hand that you can be all that you can be at Pittsburg State University.
This week-long camp will run from <<Dates>>. For further information, and to sign-up go to www.pittstate.edu.



Copy for Freshman/Sophomore Summer Football Weekend – July 22-July 24:
<<Firstname>>, Gus wants you to come spend a fun filled weekend with him, here at Pittsburg State University. Explore the Athletic Department from the locker rooms to the field at Carnie Smith Stadium. Learn new training tips to make you the best <<position>> in the four states.
When you’re done scrimmaging on the field, we invite you to explore the <<Interest>> to round out the weekend and learn first hand that you can be all that you can be at Pittsburg State University.
This weekend with Gus will run from <<dates>>. For further information and to sign-up, go to www.pittstate.edu.




I have tried making each paragraph a plain .txt file and then making it a resource. I was able to write a rule to change the paragraphs, but could not see a way to edit for the variable info needed in each paragraph.



What do we need to do to make this happen?

(the red copy and the <<>> is just to show where the variable data will go and not something that was done in FusionPro)
Reply With Quote
  #2  
Old April 23rd, 2015, 10:41 AM
mcmahand mcmahand is offline
Junior Community Member
 
Join Date: Oct 2010
Location: Charlotte, NC
Posts: 22
Default Re: Variable fields within variable paragraphs

When you go to Create Resources and click Add, there is an option for a Type called "Formatted Text". Choose that and click the Edit... button.

From there you will be in a text editor just like editing a text frame in your layout. You can copy & past text in, change formatting, and place variables (or even text rules).

Click OK when you're done, and optionally, change the name of the resource. You can use the same text rule you tried before to select between resources.
__________________
David McMahan
Data Specialist
Classic Graphics
FP 9.3.15, MAC OSX 10.8.5, Acrobat 10.1.10
Reply With Quote
  #3  
Old April 23rd, 2015, 10:52 AM
Dan Korn's Avatar
Dan Korn Dan Korn is online now
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,225
Default Re: Variable fields within variable paragraphs

You can't call out variables (data field values) in a plain text file. You need to either use <variable> tags in a JavaScript rule or in a Tagged File resource, or call the Field function in JavaScript.

But (as I noted a few minutes ago), the easiest way to do this, by far, is to create each "paragraph" as a Formatted Text Resource, using the Text Editor GUI, and then you just need a very simple rule to conditionally call out one resource or another. In fact, you can do this with a Switch Wizard rule, without writing any JavaScript code at all, like the "Story" rule in the Frodo Travel tutorial that's installed with FusionPro. But even in JavaScript, the rule would be pretty simple. I don't know what your data fields are, but it would be something like this:
Code:
if (Field("Year") == "Junior" || Field("Year") == "Senior"))
    return Resource("Upperclass");
//else
return Resource("Lowerclass");
Although again, this would be a pretty simple Switch Wizard rule too.
__________________
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
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 09:22 AM.


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