View Full Version : Statement

August 10th, 2010, 11:42 AM
I need to write a statement that says...

MATCHING GIFT ALERT : Our records show an affiliation with «DONOR MATCH» ("and" if data in next field)«DONOR OTHER»("and" if data in next field)«SPOUSE MATCH»("and" if data in next field)«SPOUSE OTHER». They have a matching gift program. Please follow the procedure your company has established to have your gift matched.
m I will initiate the matching gift process with my company.

If no matching company is listed in any of the 4 fields the statement should say...
Many companies will match the gifts their employees make to Purdue. Some match the gifts of retirees too. If you know your company matches, please obtain and process the matching gift form, or if your company requires claims to be done online, please go to their website. Not sure if your company matches? Go to www.matchinggifts.com/purdue (http://www.matchinggifts.com/purdue)
mMy company should match my gift. I will initiate the matching gift process with my company.
Company name:_____________________________________________ __________
(Remember, matching gifts increase your giving power.)

I have no idea how to make this happen, I do not know JS. I am working with Fusion Pro 7 and Acrobat 8

Attached is sample data. Thank you for any help.

August 11th, 2010, 06:24 AM
Wow, Dan just made a hit & run -- edited your OP but neglected to provide an answer! He must have been busy, or frustrated with your posting style and lack of desire to get your hands wet with the JavaScript juice. Or maybe, since he's in Chicago, he has a strong negative feeling about Purdue. However, since my dad is a retired Boilermaker, I'll see if I can get you started on a solution. ;)

One way of going about this would be to create some formatted text resources for the two versions that can be returned (see attached images for "NonMatch" and "Match" small size courtesy of forum limitations). For the "Match" version, we will also build the custom text with a text rule and concatenate the "Match" resource at the end. Your text field will then reference the rule to return either of the two solutions based on your record's data. Simple enough?

var result = "";

// MATCHING GIFT ALERT : Our records show an affiliation with DONOR MATCH
result += (Field("DONOR MATCH")) ? "<b>MATCHING GIFT ALERT:</b> Our records show an affiliation with " + Field("DONOR MATCH") : "";

// ("and" if data in next field) DONOR OTHER
result += (Field("DONOR OTHER")) ? " and " + Field("DONOR OTHER") : "";

// ("and" if data in next field) SPOUSE MATCH
result += (Field("SPOUSE MATCH")) ? " and " + Field("SPOUSE MATCH") : "";

// ("and" if data in next field) SPOUSE OTHER.
result += (Field("SPOUSE OTHER")) ? " and " + Field("SPOUSE OTHER") : "";

// They have a matching...with my company.
result += ". " + Resource("Match");

// ELIGIBLE FOR A MATCHING GIFT?...increase your giving power.)
if (result = "") result = Resource("NonMatch");

return result;

This code may require some tweaking for your specific situation, but I think it will get you at least to the outskirts of West Lafayette. After that you can just use your thumb. :)

August 12th, 2010, 12:10 PM
Thanks for your help. :)