CSemrau Posted March 30, 2010 Share Posted March 30, 2010 I have multiple formatted text resources that will be pulled into 2 separate text frames depending on whether they are specified within the Left Coupon field (LOffer) or the Right Coupon field (ROffer) within the data. There are variables within the formatted text resource that need to use only the fields for the left coupon (ex. LExpire, LValue, LVar1) if the formatted text resource is specified within the LOffer field, and use the data fields for the right coupon (ex. RExpire, RValue, RVar1) if used within the ROffer field. The problem is that both will be represented within each record of the data as the left and right coupons will both always print. These formatted text resources will be used for both LOffer and ROffer interchangeably. I was wondering if anyone would have an idea on how to format a rule to allow for the following example: Data file includes: LOffer - A004 LValue - 20% LVar1 - 90 days past letter date LVar2 - 80 miles LExpire - June 2012 ROffer - A005 RValue - 10% RVar1 60 days past letter date RVar2 - 60 miles RExpire - May 2011 The formatted text resource may read (for A004): Our records show that your vehicle has exceeded <<LVar2>>. Please enjoy a <<LValue>> discount for your next service visit to thank you for your continued support. This coupon is good for <<LVar1>>. Please call us at <<Phone>> to take advantage of this offer. Expires: <<LExpire>> The formatted text resource may read (A005): For your continued support of our company, please enjoy this <<RValue>> discount on your next service visit. Our records show that your vehicle is approaching <<RVar2>>, which is a benchmark for certain standard vehicle maintenance requirements. Expires: <<RExpire>> I need to have only the "L" variable fields populate within the formatted text resource if the coupon (formatted text resource) A004 is requested within the LOffer field. I need to have only the "R" variable fields populate within the formatted text resource if the coupon (formatted text resource) A005 is requested within the ROffer field. The next record within the data may request the A004 to be used within both the LOffer and the ROffer fields - but the info needed to populate the variables within the formatted text resource would depend on which side the coupon is to print on (Left or Right - LValue, RValue etc.) Link to comment Share on other sites More sharing options...
esmith Posted March 30, 2010 Share Posted March 30, 2010 If I'm understanding correctly, you would just need to have a separate rule for each coupon frame (left and right) which would pull the appropriate text resource* (A004, A005, etc), replace the placeholder strings with information from your data (i.e. Field("RVar2") (for the right coupon rule) replaces "<<RVar2>>"), and return the edited content. * Of course, when I did something similar, I was unable to return modified data from a resource, and instead had to copy my resource text into my JavaScript Globals window as separate variables. Link to comment Share on other sites More sharing options...
CSemrau Posted March 30, 2010 Author Share Posted March 30, 2010 The issue is that we will only have one formatted text resource (A005) created. This same text resource will need to work for either the left coupon, the right coupon or both simultaneously - depending on the data. The data will have information populating both LValue and RValue, but each is to correspond to only the formatted text resource that is called for within the LOffer or the ROffer. If I just replace the tagged text with the field names, LValue or RValue, both values will populate because both are available in each record. Maybe I'm not understanding what you are really saying. ) Link to comment Share on other sites More sharing options...
CSemrau Posted March 30, 2010 Author Share Posted March 30, 2010 One other note, there are hundreds of these formatted text resources total that will be used for either the left or the right coupon text frames. I have the formatted text resources working within the needed text frames. I just need to have the variables used within these text resources populate with the correct Left or Right data. Link to comment Share on other sites More sharing options...
Dan Korn Posted March 30, 2010 Share Posted March 30, 2010 I think that Eric's suggestion is what you want to do. You must already have a rule which is pulling a Formatted Text Resource into the text frame. Within the Formatted Text Resource, any text variables will be replaced with the field or rule values for that record. If the resource is only using the "L" variables, then only those will be replaced. It might be easier if you attached a sample job which shows exactly what you're trying to do. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.