Jump to content

Variable fields within variable paragraphs


PSU-GIT

Recommended Posts

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...