rpaterick
-
Posts
432 -
Joined
Posts posted by rpaterick
-
-
Hope that helps.
Thanks Step,
I will definetly check this out!!!
-
So all of the data changes per record for their unique URL or "PURL" for this campaign.
Customer would like to do the following:
Change this:
www.Prepass66.Myprepassbenefits.com
to this:
www.Prepass66.MyPrePassBenefits.com
My attempt to make this happen:
return Field("Personalized URLs").replace(/[\Myprepassbenefits\>\/]/g,"MyPrePassBenefits");
Basically, initial cap-case conversion for just part the Myprepassbenefits portion of the data.
-
Also, I don't know that field you're trying to apply these rules to. The first rule calls out a field named "CardImage", while the second calls out a rule named "Full Name".
So what are you really trying to do here? Are you trying to set the "CardImage" field, or the "Full Name" field? Or both, and if so, how are these rules related at all?
Sorry Dan about the confusion.
Here is a breakdown:
Field Full Namein Data file needs to be capitalized, right now it's initial caps.
The rule "Full Name On Card" is the ALL Caps rule that's needed.
Whenever the name FREEDOM appears in the CardImage field, I need the font color to change to Full Name On Card. ColorRule should be then applied.
So I'm trying to combine Full Name on Card and the CardImage Rules together to get the desired outcome, one rule.
Thanks Dan, appreciate the help.
-
Sure, take a look at this thread:
http://forums.pti.com/showthread.php?t=27
I found it with this search:
https://google.com/search?q=site:forums.pti.com+font+color+based+on+data
Thanks Dan.
I'm trying to put it together now.
Code for color:
if (Field("CardImage") == "") return ""; else return "CardImage: "+ "<color name = \"White\"> " + Field("CardImage") + "<color name= \"Black\">";
Code to change the Full Name field to ALL CAPS.
var Var1 = "Full Name"; var CaseSelection = "allcaps"; if(CaseSelection == "allcaps") return ToUpper(Field(Var1)); if(CaseSelection == "smallcaps") return "<smallcap>" + Field(Var1) + "</smallcap>"; if(CaseSelection == "propercase") return ToTitleCase(Field(Var1)); if(CaseSelection == "lowercase") return ToLower(Field(Var1));
Put it together
return '<ColorRule="' + Rule("Full Name On Card") + '">';
I'm close but can't seem to get it to work. I might not be close either...
-
switch (Field("Master Tier")) { case "Platinum Y Freedom": case "Platinum N Freedom": FusionPro.Composition.SetBodyPageUsage("2",true); FusionPro.Composition.SetBodyPageUsage("3",true); break; default: FusionPro.Composition.SetBodyPageUsage("1",true); FusionPro.Composition.SetBodyPageUsage("4",true); }
Thanks Dan! I was trying to figure out how to cleanup the code and this did it!
I have another question and it's not topic related here:
Would you be able to direct me to a thread that deals with changing font color based on data input as well? Or is there something in the user manual that explains how to do this?
Thanks Dan for your help!
-
Need help in modifying the following code that is high-lighted in red:
I'm not sure on how you do multiple data inputs for page switch/callout.
if (Field("Master Tier") == "[color=Red]Platinum Y Freedom","Platinum N Platinum[/color]") { FusionPro.Composition.SetBodyPageUsage("2",true); FusionPro.Composition.SetBodyPageUsage("3",true); } else { FusionPro.Composition.SetBodyPageUsage("1",true); FusionPro.Composition.SetBodyPageUsage("3",true); }
Thanks!
-
sure, although (1) you don't specify what the field delimiter should be, and (2) your syntax isn't quite right. You need to add some literal delimiter characters in there, using the + (string concatenation) operator. Assuming that the fields within the address should be delimited with commas, as is the convention for mecard, this will probably work:
adr: Optionalfieldorrule(addressfieldorrule) + "," + optionalfieldorrule(cityfieldorrule) + "," + optionalfieldorrule(statefieldorrule) + "," + optionalfieldorrule(zipfieldorrule),
or, it might be easier to do all that on a different line, and assign the full address to another variable, which will make the code a little cleaner. So near the top of the rule, you can do this:
var address = optionalfieldorrule(addressfieldorrule) + "," + optionalfieldorrule(cityfieldorrule) + "," + optionalfieldorrule(statefieldorrule) + "," + optionalfieldorrule(zipfieldorrule);
or, even more succinctly:
var address = [ optionalfieldorrule(addressfieldorrule), optionalfieldorrule(cityfieldorrule), optionalfieldorrule(statefieldorrule), optionalfieldorrule(zipfieldorrule) ].join();
then the line setting the property of the "info" object can be simply:
adr: Address,
also, you could change all of those calls to optionalfieldorrule to call fieldorrule, or even simply field, instead, since the field names are all specified, hard-coded, at the top of the rule. Those are only set up to be optional for the xml template rule in case the user doesn't select anything in the drop-down list; but once you're in javascript, the field names are set.
fantastic!!!
-
The best thing to do is to find an example of a barcode that does scan successfully on your iPhone. Then, there should be an option in the barcode reader app to give you back the text contents of the barcode verbatim. Once you have that, you can write the rule so that it generates the barcode contents to match that format.
It appears the previous print shop put the Address, City, State and Zip all in one column.
Is there a way to use the "+" feature for concatenating in the QR code?
something like this below....
ADR: OptionalFieldOrRule(AddressFieldOrRule) OptionalFieldOrRule(CityFieldOrRule), + OptionalFieldOrRule(StateFieldOrRule), + OptionalFieldOrRule(ZipFieldOrRule),
Thanks Dan!
-
Text field for QR Contact Information code:
Full Name, Phone, Email, and Address work but I can't get the City, State, and Zip to populate(QR reader on a Iphone5).
I tried to manipulate the code for the following fields:
City
State
Zip
var NameFieldOrRule = "Full Name"; var PhoneFieldOrRule = "phone 1 number"; var EmailFieldOrRule = "Email Address"; var CityFieldOrRule = "City"; var AddressFieldOrRule = "Address 1"; var StateFieldOrRule = "State"; var ZipFieldOrRule = "Zip"; var PointSize = ""; // MECARD format // http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/function/application/addressbook // Also see: http://code.google.com/p/zxing/wiki/BarcodeContents var info = { N: FieldOrRule(NameFieldOrRule), TEL: OptionalFieldOrRule(PhoneFieldOrRule).replace(/\D/g,''), EMAIL: OptionalFieldOrRule(EmailFieldOrRule), CITY: OptionalFieldOrRule(CityFieldOrRule), ADR: OptionalFieldOrRule(AddressFieldOrRule), State: OptionalFieldOrRule(StateFieldOrRule), ZIP: OptionalFieldOrRule(ZipFieldOrRule), } var result = ""; for (var label in info) { if (!info[label]) continue; result += label; if (!label.match(/\:$/)) result += ":"; result += info[label]; result += FusionPro.inValidation ? '\r' : ';'; } if (FusionPro.inValidation) return result; var QR = new QRBarcode; QR.pointSize = Int(PointSize) || 6; return QR.Make("MECARD:" + result + ";");
Am I better off changing the QR Contact (vCard) - Graphic?
Just wanted to see what direction to head.
Thanks!
-
Not really sure how it would pull from last months artwork?
Found out under ADVANCED TAB it was searching the OLD path. Updated job number to new path number and fixed it.
-
New InDesign File, Export to FusionPro(old template), Previews fine in Fusion, RIP for PDF Preview and shows old artwork(last months)???
Not really sure how it would pull from last months artwork?
-
Furthermore, you can probably accomplish what you need with some kind of copyfitting instead of calling out completely different resources or pages.
The marketing designer has dictated how they want the smaller number of characters to break(paragraph) and longer characters to break.
I did the "Len" formula in excel and then sorted to see where the breaking(text flow) issue for them is occurring, that they didn't like the text wrapping.
Thanks Dan for your help this is very appreciated!
-
I have text flow issue with short name and long name inputs in the data file.
How can I call out a text resource based on character length?
Also, how could I call out a "page" based on character length also(just in-case)?
The character length is 7 characters, for the breaking point.
Thanks!
-
I would look into Direct/Producer for RIPPING the .ps files. Having Producer will save you A LOT of time and should pay for itself if you have the volume.
-
Make them into images and then do a simple "switch" statement in fusionpro or...
take those same images and create the following rule:
return CreateResource(Field("version"));
The data inputs have to be called the same as the IMAGES to call them out properly. Images have to be in the same PATH as your FusionPro template also(I think).
Hopefully this gets you started and Dan may have a simpler way to do it also.
-
return Field("Full Name").replace(/[\<\>\/.]/g," ").replace(/\d{4,}/g,'');
Thanks Dan. I'm thinking of going in a different direction now.
How can put in multiple formats of PHONE NUMBERS to be taken out?
Example of different phone numbers that are formatted in the list.
847 695 3250
847-804-2108
5214626
How could I "build" up a code to put in different "#" scenarios(###-###-####, ###-####,(###)-###-####, etc..)
that FusionPro would recognize and replace with nothing?
Thanks Dan!!
-
From the description, I think you mean "4 or more," i.e. "more than 3," not "more than 4." Anyway, this should do that:
return Field("Full Name").replace(/[\<\>\/.]/g," ");
Dan, Thanks for the quick reply(as usual:D).
The code abover, how can I incorporate your code with this one? I'm not sure where to insert the addition of taking out the 4 or more numbers.
Thanks Dan!
-
Seeing if this is possible?
ex: RON CONLEY APARTMENTS 933
This would be OK to leave the 933 in the record.
ex: RON CONLEY APARTMENTS 9334
ex: PEP BOYS 1407 4YD
ex: 5806-TGC-280679-WEST CHICAGO
I would like FusionPro to take out all of the numbers.
Could be any combination of numbers and be anywhere in the cell placed. So basically if there are more than 4 numbers in the record, delete them.
Thanks!
-
In regards to the middle initial, the code replaces spaces with a separator from the "sep" array. If the name is passed to the code in this format: "John W Smith", the code will return "JohnWSmith" or "John.W.Smith", etc.
Thanks, this is very helpful!
-
One last thing Step.
How is the MIDDLE initial handled? Does your client want that left in(avoids doubles) or is the middle initial taken out?
Thanks!
-
Thanks Step.
From reading the code, you have up to 3 different options going, correct?
Thanks Step, this looks great though!
-
Are you saying that out of 20,000 records, 293 records have the same name in fields Name1, Name2, and Name3? And you want them formatted differently?
Can you post an example? Or better describe what you're asking?
Out of the 20,000 records, there are 293 groups or 586 duplicate names.
ex: Aaron Smith
I have to have one Aaron Smith like this:
The next Aaron Smith to come along needs to be like this:
Both Aaron Smith's live at different addresses but would need their own "unique" purl ID when they log onto the website that is their own.
Thanks!
-
For a campaign of 20,000 records, we have 293 sets/groups of names that have the same name.
Customer would like the following formatting(up to 3 names the same):
Name 1: JohnSmith@.edu
Name 2: John.Smith@.edu
Name 3: John Smith@.edu
Any idea how to handle this with automation? I really do not want to go through all 293 groups and manipulate.
Thanks!
-
Anyone outputting PPML to the Indigo just 1-out and then easily able to Impose at the RIP for multiple up/CUT-N-STACK?
Thanks
Changing particular text within the data.
in Formatting Text
Posted
That Worked! I now also understand this particular code.
Thanks again!